diff --git a/kernel-module/nft_rtpengine.c b/kernel-module/nft_rtpengine.c index ce02da920..65fefd475 100644 --- a/kernel-module/nft_rtpengine.c +++ b/kernel-module/nft_rtpengine.c @@ -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)