summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2006-10-03 01:15:11 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-03 08:04:13 -0700
commita09fd48f8fb6ecb8bf85efdd884b21b6201ef9cc (patch)
tree5e72898b6c72ad5a351a6b83c3b92ed39e4e2430 /drivers
parentf5b747b487038ce2a23e7b922bc4d27149838965 (diff)
[PATCH] fbdev: correct buffer size limit in fbmem_read_proc()
Address http://bugzilla.kernel.org/show_bug.cgi?id=7189 It should check `clen', not `len'. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: <jurij@wooyd.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: <stable@kernel.org> Cc: Willy Tarreau <w@1wt.eu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fbmem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 17961e3ecaa0..93ffcdd95f50 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -554,7 +554,8 @@ static int fbmem_read_proc(char *buf, char **start, off_t offset,
int clen;
clen = 0;
- for (fi = registered_fb; fi < &registered_fb[FB_MAX] && len < 4000; fi++)
+ for (fi = registered_fb; fi < &registered_fb[FB_MAX] && clen < 4000;
+ fi++)
if (*fi)
clen += sprintf(buf + clen, "%d %s\n",
(*fi)->node,