summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/core/info.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/core/info.c b/sound/core/info.c
index 895362a696c9..291d6ed80d80 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -329,6 +329,9 @@ static ssize_t snd_info_text_entry_write(struct file *file,
if (!valid_pos(pos, count))
return -EIO;
next = pos + count;
+ /* don't handle too large text inputs */
+ if (next > 16 * 1024)
+ return -EIO;
mutex_lock(&entry->access);
buf = data->wbuffer;
if (!buf) {