summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2006-10-03 01:15:11 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-13 13:23:27 -0700
commite7754ec83e191457d727b254f284f5215f938a69 (patch)
tree71f21dfb1f6436a94e1448a05c39c105181c88d5 /drivers/video
parent9698398518a14640f07f28faae9b0060fe5277e5 (diff)
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: Willy Tarreau <w@1wt.eu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/video')
-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,