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

Fixed bug: Crash of module if direct copying from buff

parent e1399c8e
No related branches found
No related tags found
No related merge requests found
......@@ -194,7 +194,7 @@ device_write(struct file *filp, const char *buff, size_t len, loff_t * off)
int i;
for(i = 0; i < len; i++) //Save the given string
get_user(msg_username[i], buff + i);
//msg_username[i] = buff[i]; //Heres the CRASH
//msg_username[i] = buff[i]; //Heres was the CRASH
//printk(KERN_INFO "Got %c at %d from %d bytes.\n", buff[i], i, (int)len);
for(i = len; i < USERBUF_LEN; i++) //Zeroing the rest of mem
msg_username[i] = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment