]> xenbits.xensource.com Git - people/andrewcoop/seabios.git/commit
smbios: catch zero-length strings
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 20 Jan 2014 13:32:54 +0000 (14:32 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 22 Jan 2014 07:55:08 +0000 (08:55 +0100)
commit344496fae4bee9243be7f9719a60b01189c12f00
tree71ecce901251c00b6ca76d3e79ff5e6fe1971eff
parent19f789bdfd58eba2ed8fe604bbabf8df0fcc0771
smbios: catch zero-length strings

qemu may pass us zero-length strings for smbios fields, when starting
qemu this way  ...

qemu -smbios type=1,version=,serial=test

... for example.

Today we don't specifically handle them and simply append them to the
string list.  Therefore we get two string-terminating zeros in a row.
Result is that we by accident create a end-of-entry marker in the middle
of the entry.

Fix this by handling zero-length strings like non-present strings.

Cc: armbru@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
src/fw/smbios.c