Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82497
b: refs/heads/master
c: 87d26ea
h: refs/heads/master
i:
  82495: 33e76de
v: v3
  • Loading branch information
J. Bruce Fields committed Feb 1, 2008
1 parent 0cad39a commit b70c7b1
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 50431d94e732ba71b66a83c5435890728e313095
refs/heads/master: 87d26ea7771ad637035e6bd5a2700d81ee9162da
5 changes: 4 additions & 1 deletion trunk/fs/nfsd/nfsctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ static ssize_t write_filehandle(struct file *file, char *buf, size_t size)
struct auth_domain *dom;
struct knfsd_fh fh;

if (size == 0)
return -EINVAL;

if (buf[size-1] != '\n')
return -EINVAL;
buf[size-1] = 0;
Expand Down Expand Up @@ -663,7 +666,7 @@ static ssize_t write_recoverydir(struct file *file, char *buf, size_t size)
char *recdir;
int len, status;

if (size > PATH_MAX || buf[size-1] != '\n')
if (size == 0 || size > PATH_MAX || buf[size-1] != '\n')
return -EINVAL;
buf[size-1] = 0;

Expand Down

0 comments on commit b70c7b1

Please sign in to comment.