Re: [libvirt] [PATCH] conf: Catch memory size overflow earlier

2015-05-20 Thread Peter Krempa
On Wed, May 20, 2015 at 14:20:04 +0200, Michal Privoznik wrote: > On 19.05.2015 17:05, Peter Krempa wrote: > > virDomainParseMemory parses the size and then rounds up while converting > > it to kibibytes. Since the number is limit-checked before the rounding > > it's possible to use a number that w

Re: [libvirt] [PATCH] conf: Catch memory size overflow earlier

2015-05-20 Thread Michal Privoznik
On 19.05.2015 17:05, Peter Krempa wrote: > virDomainParseMemory parses the size and then rounds up while converting > it to kibibytes. Since the number is limit-checked before the rounding > it's possible to use a number that would be correctly parsed the first > time, but not the second time. For

[libvirt] [PATCH] conf: Catch memory size overflow earlier

2015-05-19 Thread Peter Krempa
virDomainParseMemory parses the size and then rounds up while converting it to kibibytes. Since the number is limit-checked before the rounding it's possible to use a number that would be correctly parsed the first time, but not the second time. For numbers not limited to 32 bit systems the magic i