lkml.org 
[lkml]   [2006]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 59/67] fbdev: correct buffer size limit in fbmem_read_proc()

-stable review patch. If anyone has any objections, please let us know.

------------------
From: Geert Uytterhoeven <geert@linux-m68k.org>

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>


---
drivers/video/fbmem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.18.orig/drivers/video/fbmem.c
+++ linux-2.6.18/drivers/video/fbmem.c
@@ -554,7 +554,8 @@ static int fbmem_read_proc(char *buf, ch
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,
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-11 23:15    [W:1.134 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site