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
Kconfig -rw-r--r-- 3.0 KB
Kconfig.iosched -rw-r--r-- 1.8 KB
Makefile -rw-r--r-- 641 bytes
blk-cgroup.c -rw-r--r-- 38.4 KB
blk-cgroup.h -rw-r--r-- 10.4 KB
blk-core.c -rw-r--r-- 69.8 KB
blk-exec.c -rw-r--r-- 2.9 KB
blk-flush.c -rw-r--r-- 6.8 KB
blk-integrity.c -rw-r--r-- 11.1 KB
blk-ioc.c -rw-r--r-- 3.6 KB
blk-iopoll.c -rw-r--r-- 5.9 KB
blk-lib.c -rw-r--r-- 4.4 KB
blk-map.c -rw-r--r-- 8.2 KB
blk-merge.c -rw-r--r-- 10.9 KB
blk-settings.c -rw-r--r-- 25.5 KB
blk-softirq.c -rw-r--r-- 4.1 KB
blk-sysfs.c -rw-r--r-- 14.4 KB
blk-tag.c -rw-r--r-- 9.9 KB
blk-throttle.c -rw-r--r-- 28.5 KB
blk-timeout.c -rw-r--r-- 5.6 KB
blk.h -rw-r--r-- 4.6 KB
bsg.c -rw-r--r-- 23.7 KB
cfq-iosched.c -rw-r--r-- 104.9 KB
cfq.h -rw-r--r-- 3.6 KB
compat_ioctl.c -rw-r--r-- 21.0 KB
deadline-iosched.c -rw-r--r-- 11.4 KB
elevator.c -rw-r--r-- 24.2 KB
genhd.c -rw-r--r-- 42.2 KB
ioctl.c -rw-r--r-- 8.1 KB
noop-iosched.c -rw-r--r-- 2.6 KB
scsi_ioctl.c -rw-r--r-- 18.3 KB

back to top