diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2006-10-03 04:15:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:04:13 -0400 |
commit | a09fd48f8fb6ecb8bf85efdd884b21b6201ef9cc (patch) | |
tree | 5e72898b6c72ad5a351a6b83c3b92ed39e4e2430 /drivers/video/fbmem.c | |
parent | f5b747b487038ce2a23e7b922bc4d27149838965 (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/video/fbmem.c')
-rw-r--r-- | drivers/video/fbmem.c | 3 |
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, | |||
554 | int clen; | 554 | int clen; |
555 | 555 | ||
556 | clen = 0; | 556 | clen = 0; |
557 | for (fi = registered_fb; fi < ®istered_fb[FB_MAX] && len < 4000; fi++) | 557 | for (fi = registered_fb; fi < ®istered_fb[FB_MAX] && clen < 4000; |
558 | fi++) | ||
558 | if (*fi) | 559 | if (*fi) |
559 | clen += sprintf(buf + clen, "%d %s\n", | 560 | clen += sprintf(buf + clen, "%d %s\n", |
560 | (*fi)->node, | 561 | (*fi)->node, |