MT#55283 ensure null termination

Change-Id: I15c8d0bf2b30236888131aa51a7b4b2f2641c339
pull/2141/head
Richard Fuchs 2 weeks ago
parent be70cb4168
commit c4603dc3f3

@ -3032,6 +3032,8 @@ static ssize_t proc_main_control_write(struct file *file, const char __user *buf
if (copy_from_user(&b, buf, buflen))
return -EFAULT;
b[buflen] = '\0';
if (!strncmp(b, "add ", 4)) {
id = simple_strtoul(b + 4, &endp, 10);
if (endp == b + 4)

Loading…
Cancel
Save