Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19448
b: refs/heads/master
c: 172411f
h: refs/heads/master
v: v3
  • Loading branch information
Davi Arnaut authored and Linus Torvalds committed Feb 1, 2006
1 parent 56f97bd commit 8fe2518
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 46d0d2c811c8e9dd5cffdc3a5c03d988eb5a2996
refs/heads/master: 172411f10c25bbd81b19f67566af6a7f549f46a9
6 changes: 5 additions & 1 deletion trunk/drivers/s390/char/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,11 @@ do_kdgkb_ioctl(struct kbd_data *kbd, struct kbsentry __user *u_kbs,
return -EPERM;
len = strnlen_user(u_kbs->kb_string,
sizeof(u_kbs->kb_string) - 1);
p = kmalloc(len, GFP_KERNEL);
if (!len)
return -EFAULT;
if (len > sizeof(u_kbs->kb_string) - 1)
return -EINVAL;
p = kmalloc(len + 1, GFP_KERNEL);
if (!p)
return -ENOMEM;
if (copy_from_user(p, u_kbs->kb_string, len)) {
Expand Down

0 comments on commit 8fe2518

Please sign in to comment.