aboutsummaryrefslogtreecommitdiff
path: root/util/main-loop.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2022-12-01 13:11:28 +0100
committerMarkus Armbruster <armbru@redhat.com>2022-12-19 16:21:56 +0100
commit236aafa61c83d26cf9aa8b043ce92194f9be144b (patch)
treeee012712b44a25278efdfe1db0286ff9a529b596 /util/main-loop.c
parent0bcaaff8d80fd00537bb7963a9baeedb68ec2ad4 (diff)
downloadqemu-236aafa61c83d26cf9aa8b043ce92194f9be144b.zip
qemu-236aafa61c83d26cf9aa8b043ce92194f9be144b.tar.gz
qemu-236aafa61c83d26cf9aa8b043ce92194f9be144b.tar.bz2
pci: Fix silent truncation of pcie_aer_inject_error argument
PCI AER error status is 32 bit. The HMP command supports both symbolic and numeric error status: anything that isn't a known symbolic value is parsed as number with strtol(). Issues: * Empty argument yields value zero. * Range errors from strtol() are ignored, value is UINT32_MAX. * Values not representable in uint32_t are silently truncated. Fix to reject such input by switching to strtoui(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20221201121133.3813857-9-armbru@redhat.com>
Diffstat (limited to 'util/main-loop.c')
0 files changed, 0 insertions, 0 deletions