Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336176
b: refs/heads/master
c: 21d8a15
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Nov 30, 2012
1 parent d9b5b21 commit adb130d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0903a0c8491c1e987dfc6eb294199a36760398bc
refs/heads/master: 21d8a15ac333b05f1fecdf9fdc30996be2e11d60
5 changes: 5 additions & 0 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2131,6 +2131,11 @@ struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
if (!len)
return ERR_PTR(-EACCES);

if (unlikely(name[0] == '.')) {
if (len < 2 || (len == 2 && name[1] == '.'))
return ERR_PTR(-EACCES);
}

while (len--) {
c = *(const unsigned char *)name++;
if (c == '/' || c == '\0')
Expand Down

0 comments on commit adb130d

Please sign in to comment.