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
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 941 bytes
.mailmap -rw-r--r-- 4.0 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 91.7 KB
Kbuild -rw-r--r-- 2.4 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 187.2 KB
Makefile -rw-r--r-- 50.9 KB
README -rw-r--r-- 17.1 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top