https://github.com/torvalds/linux
Revision bbd562d717a84c6464211e8bd5efa0d9e25edc6d authored by Wim Van Sebroeck on 21 February 2011, 10:52:43 UTC, committed by Wim Van Sebroeck on 14 March 2011, 10:39:27 UTC
cppcheck-1.47 reports:
[drivers/watchdog/cpwd.c:650]: (error) Buffer access out-of-bounds: p.devs

The source code is
	for (i = 0; i < 4; i++) {
		misc_deregister(&p->devs[i].misc);

where devs is defined as WD_NUMDEVS big and WD_NUMDEVS is equal to 3.
So the 4 should be a 3 or WD_NUMDEVS.

Reported-By: David Binderman
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

1 parent c44ed96
History
Tip revision: bbd562d717a84c6464211e8bd5efa0d9e25edc6d authored by Wim Van Sebroeck on 21 February 2011, 10:52:43 UTC
watchdog: cpwd: Fix buffer-overflow
Tip revision: bbd562d
File Mode Size
.gitignore -rw-r--r-- 34 bytes
Makefile -rw-r--r-- 467 bytes
empty.c -rw-r--r-- 54 bytes
file2alias.c -rw-r--r-- 29.6 KB
mk_elfconfig.c -rw-r--r-- 1.2 KB
modpost.c -rw-r--r-- 55.2 KB
modpost.h -rw-r--r-- 5.1 KB
sumversion.c -rw-r--r-- 11.9 KB

back to top