]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
qemu: Check for negative port values in network drive configuration
authorErik Skultety <eskultet@redhat.com>
Thu, 19 Feb 2015 15:53:13 +0000 (16:53 +0100)
committerErik Skultety <eskultet@redhat.com>
Mon, 16 Mar 2015 08:46:43 +0000 (09:46 +0100)
commit84646165262de4fcdfca49e9e9198fa7b26edea6
tree907b7e2d547082a3829c9e81c1617ffd4ae76841
parent043c660e315ee79f0c795f7f860ca54c54b7cff0
qemu: Check for negative port values in network drive configuration

We interpret port values as signed int (convert them from char *),
so if a negative value is provided in network disk's configuration,
we accept it as valid, however there's an 'unknown cause' error raised later.
This error is only accidental because we return the port value in the return code.
This patch adds just a minor tweak to the already existing check so we
reject negative values the same way as we reject non-numerical strings.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1163553
src/qemu/qemu_command.c