Re: [Qemu-devel] [PATCH 2/3] check-qdict: Fix possible crash

2011-02-20 Thread Aurelien Jarno
On Fri, Jan 21, 2011 at 10:50:30PM +0100, Stefan Weil wrote: > This warning is reported by cppcheck: > > check-qdict.c:270: warning: scanf without field width limits can crash with > huge input data > > Fix it by limiting the field widths to 127 (both key and value take > 127 characters + a term

[Qemu-devel] [PATCH 2/3] check-qdict: Fix possible crash

2011-01-21 Thread Stefan Weil
This warning is reported by cppcheck: check-qdict.c:270: warning: scanf without field width limits can crash with huge input data Fix it by limiting the field widths to 127 (both key and value take 127 characters + a terminating '\0' byte). Signed-off-by: Stefan Weil --- check-qdict.c |3