diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2006-11-08 07:48:45 +0100 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-11-08 07:48:45 +0100 |
commit | 5f4b6b038a617c333fd4c3b6d66ca31c51dddd5f (patch) | |
tree | d587019bd16b295ce89a27c2e0c72fff4b948dd0 /drivers/video | |
parent | 41dc00ec4d90588a7362075cfd0f0afae5d29ff4 (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>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'drivers/video')
-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 b3094aeda1e..b1b4d1342f0 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, |