diff options
Diffstat (limited to 'fs/nfs/getroot.c')
-rw-r--r-- | fs/nfs/getroot.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c index d1cbf0a0fbb2..522e5ad4d8ad 100644 --- a/fs/nfs/getroot.c +++ b/fs/nfs/getroot.c | |||
@@ -175,6 +175,9 @@ next_component: | |||
175 | path++; | 175 | path++; |
176 | name.len = path - (const char *) name.name; | 176 | name.len = path - (const char *) name.name; |
177 | 177 | ||
178 | if (name.len > NFS4_MAXNAMLEN) | ||
179 | return -ENAMETOOLONG; | ||
180 | |||
178 | eat_dot_dir: | 181 | eat_dot_dir: |
179 | while (*path == '/') | 182 | while (*path == '/') |
180 | path++; | 183 | path++; |