diff options
Diffstat (limited to 'kernel/printk.c')
-rw-r--r-- | kernel/printk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index e61346faf6a5..8fb01c32aa3b 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -921,7 +921,7 @@ int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, cha | |||
921 | if (strcmp(console_cmdline[i].name, name) == 0 && | 921 | if (strcmp(console_cmdline[i].name, name) == 0 && |
922 | console_cmdline[i].index == idx) { | 922 | console_cmdline[i].index == idx) { |
923 | c = &console_cmdline[i]; | 923 | c = &console_cmdline[i]; |
924 | memcpy(c->name, name_new, sizeof(c->name)); | 924 | strlcpy(c->name, name_new, sizeof(c->name)); |
925 | c->name[sizeof(c->name) - 1] = 0; | 925 | c->name[sizeof(c->name) - 1] = 0; |
926 | c->options = options; | 926 | c->options = options; |
927 | c->index = idx_new; | 927 | c->index = idx_new; |