diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2006-10-03 08:15:11 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 15:04:13 (GMT) |
commit | a09fd48f8fb6ecb8bf85efdd884b21b6201ef9cc (patch) | |
tree | 5e72898b6c72ad5a351a6b83c3b92ed39e4e2430 /drivers/video/fbmem.c | |
parent | f5b747b487038ce2a23e7b922bc4d27149838965 (diff) | |
download | linux-a09fd48f8fb6ecb8bf85efdd884b21b6201ef9cc.tar.xz |
[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 17961e3..93ffcdd 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 < ®istered_fb[FB_MAX] && len < 4000; fi++) + for (fi = registered_fb; fi < ®istered_fb[FB_MAX] && clen < 4000; + fi++) if (*fi) clen += sprintf(buf + clen, "%d %s\n", (*fi)->node, |