From: Wim Van Sebroeck Date: Mon, 21 Feb 2011 10:52:43 +0000 (+0000) Subject: watchdog: cpwd: Fix buffer-overflow X-Git-Tag: v2.6.38~8^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbd562d717a84c6464211e8bd5efa0d9e25edc6d;p=pandora-kernel.git watchdog: cpwd: Fix buffer-overflow 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 --- Reading git-diff-tree failed