[libvirt] [PATCH] conf: forbid negative values in virDomainParseScaledValue

Martin Kletzander mkletzan at redhat.com
Thu Oct 30 07:11:03 UTC 2014


On Wed, Oct 29, 2014 at 04:18:42PM -0600, Eric Blake wrote:
>On 10/29/2014 10:35 AM, Martin Kletzander wrote:
>> It makes sense for none of the callers to have negative value as an
>> output and, fortunately, if anyone tried defining domain with negative
>> memory or any other value parsed by virDomainParseScaledValue(), the
>> resulting value was 0.  That means we can error out during parsing as
>> it won't break anything.
>>
>> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1155843
>>
>> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
>> ---
>> "it won't break anything" -- famous last words?
>>
>>  src/conf/domain_conf.c | 25 ++++++++++++++++---------
>>  1 file changed, 16 insertions(+), 9 deletions(-)
>
>ACK.  Sounds like a bug fix, and therefore safe for 1.2.10
>

Um... on one hand it is, but on the other one this is bug that's been
around since we introduced @unit (almost forever) :-)  Anyway, the
patch is pretty small and it affects nothing else, so I pushed it.
Thanks for the review.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141030/4d198ddc/attachment-0001.sig>


More information about the libvir-list mailing list