]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/printk.c
printk: don't read beyond string arguments' terminating zero
[linux-2.6-omap-h63xx.git] / kernel / printk.c
index e61346faf6a595408aef4b549d6f511664ed0835..8fb01c32aa3bb7eaf44f5b9e63e316628dd935c1 100644 (file)
@@ -921,7 +921,7 @@ int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, cha
                if (strcmp(console_cmdline[i].name, name) == 0 &&
                          console_cmdline[i].index == idx) {
                                c = &console_cmdline[i];
-                               memcpy(c->name, name_new, sizeof(c->name));
+                               strlcpy(c->name, name_new, sizeof(c->name));
                                c->name[sizeof(c->name) - 1] = 0;
                                c->options = options;
                                c->index = idx_new;