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

2013-11-26 Thread Peter Maydell
On 26 November 2013 15:05, Hannes Reinecke wrote: > strtoull() might return '-1' to signify an overflow. > > Signed-off-by: Hannes Reinecke > --- > hw/core/qdev-properties.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c >

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

2013-11-26 Thread Eric Blake
On 11/26/2013 08:05 AM, Hannes Reinecke wrote: > strtoull() might return '-1' to signify an overflow. Yes, but -1 (aka ULLONG_MAX) is also a valid return when there is not overflow, so testing for -1 is NOT a reliable indicator on whether overflow occurred. Also, you mention strtoull() here... >

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

2013-11-26 Thread Hannes Reinecke
strtoull() might return '-1' to signify an overflow. Signed-off-by: Hannes Reinecke --- hw/core/qdev-properties.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index dc8ae69..5761295 100644 --- a/hw/core/qdev-properties.c +++ b