]> git.proxmox.com Git - mirror_qemu.git/commit - vl.c
vl: Tighten parsing of -numa's parameter mem
authorMarkus Armbruster <armbru@redhat.com>
Tue, 22 Nov 2011 08:46:02 +0000 (09:46 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 28 Nov 2011 22:20:52 +0000 (16:20 -0600)
commitc03417b438624988f1a027ce7829696ac98c3165
tree307bc0b2c17ac13c997e1f76790fd76c2d75f850
parent8dddfb553151724a6a2110e56e8ced3213faf750
vl: Tighten parsing of -numa's parameter mem

strtosz_suffix() fails unless the size is followed by 0, whitespace or
','.  Useless here, because we need to fail for any junk following the
size, even if it starts with whitespace or ','.  Check manually.

Things like

    -smp 4 -numa "node,mem=1024,cpus=0-1" -numa "node,mem=1024 cpus=2-3"

are now caught.  Before, the second -numa's argument was silently
interpreted as just "node,mem=1024".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vl.c