diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c index 9419a99bab536..3ef51b2210237 100644 --- a/sound/soc/sof/debug.c +++ b/sound/soc/sof/debug.c @@ -350,7 +350,7 @@ static ssize_t sof_dfsentry_write(struct file *file, const char __user *buffer, char *string; int ret; - string = kzalloc(count, GFP_KERNEL); + string = kzalloc(count+1, GFP_KERNEL); if (!string) return -ENOMEM;