Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336699
b: refs/heads/master
c: 05bce79
h: refs/heads/master
i:
  336697: ecefa62
  336695: 1f87805
v: v3
  • Loading branch information
Cyril Roelandt authored and Rafael J. Wysocki committed Nov 22, 2012
1 parent cfda503 commit 3a18964
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 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: 66fd3835ac9a3740a7bf953b439e54dbc326d272
refs/heads/master: 05bce79e6d24ee6eb2beddf0f6314358404d472f
11 changes: 4 additions & 7 deletions trunk/drivers/acpi/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,16 +362,13 @@ acpi_system_write_wakeup_device(struct file *file,
struct list_head *node, *next;
char strbuf[5];
char str[5] = "";
unsigned int len = count;

if (len > 4)
len = 4;
if (len < 0)
return -EFAULT;
if (count > 4)
count = 4;

if (copy_from_user(strbuf, buffer, len))
if (copy_from_user(strbuf, buffer, count))
return -EFAULT;
strbuf[len] = '\0';
strbuf[count] = '\0';
sscanf(strbuf, "%s", str);

mutex_lock(&acpi_device_lock);
Expand Down

0 comments on commit 3a18964

Please sign in to comment.