|
@@ -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 &&
|
|
if (strcmp(console_cmdline[i].name, name) == 0 &&
|
|
console_cmdline[i].index == idx) {
|
|
console_cmdline[i].index == idx) {
|
|
c = &console_cmdline[i];
|
|
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->name[sizeof(c->name) - 1] = 0;
|
|
c->options = options;
|
|
c->options = options;
|
|
c->index = idx_new;
|
|
c->index = idx_new;
|