hw/smbios: Fix port connector option validation
commit196578c9d051d19c23e6c13e97b791a41b318315
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Mon, 29 Jan 2024 08:03:08 +0000 (29 17:03 +0900)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 13 Feb 2024 07:59:25 +0000 (13 10:59 +0300)
treef55007ec8c189505dd4ff3ccbf92b5f74b4fb938
parentcd8a35b913c24248267c682cb9a348461c106139
hw/smbios: Fix port connector option validation

qemu_smbios_type8_opts did not have the list terminator and that
resulted in out-of-bound memory access. It also needs to have an element
for the type option.

Cc: qemu-stable@nongnu.org
Fixes: fd8caa253c56 ("hw/smbios: support for type 8 (port connector)")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/smbios/smbios.c