Re: [Qemu-devel] [PATCHv4] qdev: Validate hex properties

2013-12-02 Thread Eric Blake
On 11/28/2013 11:48 PM, Hannes Reinecke wrote: > strtoul(l) might overflow, in which case it'll return '-1' and set > the appropriate error code. So update the calls to strtoul(l) when > parsing hex properties to avoid silent overflows. > And we should be using an intermediate variable to avoid clo

[Qemu-devel] [PATCHv4] qdev: Validate hex properties

2013-11-28 Thread Hannes Reinecke
strtoul(l) might overflow, in which case it'll return '-1' and set the appropriate error code. So update the calls to strtoul(l) when parsing hex properties to avoid silent overflows. And we should be using an intermediate variable to avoid clobbering of the passed-in point on error. Signed-off-by