Without it, it seems the data gets garbage at the end of the string.

Signed-off-by: Valentin David <valentin.da...@canonical.com>
---
 hw/smbios/smbios.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c
index 02a09eb9cd..7522e9a172 100644
--- a/hw/smbios/smbios.c
+++ b/hw/smbios/smbios.c
@@ -1283,6 +1283,7 @@ static int save_opt_one(void *opaque,
                 return -1;
             }
             g_byte_array_append(data, (guint8 *)buf, ret);
+            g_byte_array_append(data, (guint8 *)"\0", 1);
         }
 
         qemu_close(fd);
-- 
2.48.1


Reply via email to