Skip to content
Snippets Groups Projects
Commit 1dc5214a authored by Christian Löpke's avatar Christian Löpke
Browse files

Fixed security vulnerability if writing unterminated max length string.

parent 72b81bfa
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -183,7 +183,7 @@ device_write(struct file *filp, const char *buff, size_t len, loff_t * off)
/* Since nobody wants to read I have to correct the already told you
counter! */
told_you_counter--;
if(len > USERBUF_LEN) {
if(len >= USERBUF_LEN) {
printk( KERN_WARNING
"%s: Sorry, your input is too long. Max %d allowed!\n",
DEVICE_NAME,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment