code_junkie

Linux Kernel Programming: “Unable to handle kernel NULL pointer dereference”

Nov 12th, 2011
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. int x = 5;
  2. int * x_ptr = NULL;
  3.  
  4. x_ptr = &x; // this line may be missing in your code
  5.  
  6. *x_ptr += 5; //can't dereference x_ptr here if x_ptr is still NULL
Add Comment
Please, Sign In to add comment