summaryrefslogtreecommitdiff
path: root/vgasrc/vgautil.h
diff options
context:
space:
mode:
authorSam Eiderman <shmuel.eiderman@oracle.com>2019-04-24 17:04:09 +0300
committerKevin O'Connor <kevin@koconnor.net>2019-05-07 10:38:37 -0400
commit55eca9a14abef410d45c2f10ecd3f11c946064fc (patch)
treee03b99453ad8a3632705b282e63902843d8812c8 /vgasrc/vgautil.h
parentf4c6e4c19daf3deac2d7fc3288db5294aba955ad (diff)
downloadqemu-seabios-55eca9a14abef410d45c2f10ecd3f11c946064fc.tar.gz
smbios: Add missing zero byte to Type 0
According to SMBIOS Specification, section 6.1.3 Text Strings: "Text strings associated with a given SMBIOS structure are returned in the dmiStructBuffer, appended directly after the formatted portion of the structure. This method of returning string information eliminates the need for application software to deal with pointers embedded in the SMBIOS structure. Each string is terminated with a null (00h) BYTE and the set of strings is terminated with an additional null (00h) BYTE” Furthermore: "If the formatted portion of the structure contains string-reference fields and all the string fields are set to 0 (no string references), the formatted section of the structure is followed by two null (00h) BYTES" From the above it can be seen that any SMBIOS type which contains string references should end with an additional zero byte. This is currently handled in all SMBIOS types which use load_str_field_with_default() besides type0. Therefore, add the missing zero byte to SMBIOS Type 0. Running QEMU with: -machine pc-i440fx-2.0 (for legacy smbios) -smbios type=0,vendor=,version=,date= (for zero str_index) Will cause SMBIOS type0 entry to overrun type1 entry. Reviewed-by: Mark Kanda <mark.kanda@oracle.com> Reviewed-by: Ross Philipson <ross.philipson@oracle.com> Reviewed-By: Liran Alon <liran.alon@oracle.com> Signed-off-by: Sam Eiderman <shmuel.eiderman@oracle.com>
Diffstat (limited to 'vgasrc/vgautil.h')
0 files changed, 0 insertions, 0 deletions