Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28029
b: refs/heads/master
c: e018290
h: refs/heads/master
i:
  28027: 80a706d
v: v3
  • Loading branch information
Al Viro committed Jun 20, 2006
1 parent 32bc98e commit 0e09c7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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: ac03221a4fdda9bfdabf99bcd129847f20fc1d80
refs/heads/master: e0182909297da8d38a5d473ae7bee3d0324632a1
5 changes: 3 additions & 2 deletions trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1019,8 +1019,8 @@ static ssize_t proc_loginuid_write(struct file * file, const char __user * buf,
if (current != task)
return -EPERM;

if (count > PAGE_SIZE)
count = PAGE_SIZE;
if (count >= PAGE_SIZE)
count = PAGE_SIZE - 1;

if (*ppos != 0) {
/* No partial writes. */
Expand All @@ -1033,6 +1033,7 @@ static ssize_t proc_loginuid_write(struct file * file, const char __user * buf,
if (copy_from_user(page, buf, count))
goto out_free_page;

page[count] = '\0';
loginuid = simple_strtoul(page, &tmp, 10);
if (tmp == page) {
length = -EINVAL;
Expand Down

0 comments on commit 0e09c7c

Please sign in to comment.