]> git.proxmox.com Git - qemu.git/commit
check-qdict: Fix possible crash
authorStefan Weil <weil@mail.berlios.de>
Fri, 21 Jan 2011 21:50:30 +0000 (22:50 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 20 Feb 2011 17:45:09 +0000 (18:45 +0100)
commit7464f0587b2938a3e10e9f995f384df8a5f298ac
tree8485d320bf2091c7e14d61b44fd6f9d5efcbfaad
parent8da91fffeaffba5f014dfdcc88b672590e83b7fc
check-qdict: Fix possible crash

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 <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
check-qdict.c