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

Marked crash line on archx64.

parent 5bc1ea58
Branches
No related tags found
No related merge requests found
Pipeline #
...@@ -193,11 +193,11 @@ device_write(struct file *filp, const char *buff, size_t len, loff_t * off) ...@@ -193,11 +193,11 @@ device_write(struct file *filp, const char *buff, size_t len, loff_t * off)
else { else {
int i; int i;
for(i = 0; i < len; i++) //Save the given string for(i = 0; i < len; i++) //Save the given string
msg_username[i] = buff[i]; msg_username[i] = buff[i]; //Heres the CRASH
for(i = len; i < USERBUF_LEN; i++) //Zeroing the rest of mem for(i = len; i < USERBUF_LEN; i++) //Zeroing the rest of mem
msg_username[i] = 0; msg_username[i] = 0;
//printk(KERN_INFO "%s: Successfully got %d bytes!\n", printk(KERN_INFO "%s: Successfully got %d bytes!\n",
// DEVICE_NAME, (int)len); DEVICE_NAME, (int)len);
if(msg_username[len-1] == '\n') //Got new line terminator ? if(msg_username[len-1] == '\n') //Got new line terminator ?
msg_username[len-1] = 0; //Then terminate it! msg_username[len-1] = 0; //Then terminate it!
return len; //Emit successfully stored len bytes return len; //Emit successfully stored len bytes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment