fbcon: prevent possible buffer overflow.
authorPaul Cercueil <paul@crapouillou.net>
Tue, 24 Jul 2012 01:00:24 +0000 (03:00 +0200)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Thu, 23 Aug 2012 12:22:46 +0000 (12:22 +0000)
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
drivers/video/console/fbcon.c

index 88e9204..fdefa8f 100644 (file)
@@ -449,7 +449,7 @@ static int __init fb_console_setup(char *this_opt)
 
        while ((options = strsep(&this_opt, ",")) != NULL) {
                if (!strncmp(options, "font:", 5))
-                       strcpy(fontname, options + 5);
+                       strlcpy(fontname, options + 5, sizeof(fontname));
                
                if (!strncmp(options, "scrollback:", 11)) {
                        options += 11;