diff options
Diffstat (limited to 'fs/exportfs/expfs.c')
-rw-r--r-- | fs/exportfs/expfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c index 293bc2e47a73..a235f0016889 100644 --- a/fs/exportfs/expfs.c +++ b/fs/exportfs/expfs.c | |||
@@ -231,7 +231,7 @@ static int filldir_one(void * __buf, const char * name, int len, | |||
231 | int result = 0; | 231 | int result = 0; |
232 | 232 | ||
233 | buf->sequence++; | 233 | buf->sequence++; |
234 | if (buf->ino == ino) { | 234 | if (buf->ino == ino && len <= NAME_MAX) { |
235 | memcpy(buf->name, name, len); | 235 | memcpy(buf->name, name, len); |
236 | buf->name[len] = '\0'; | 236 | buf->name[len] = '\0'; |
237 | buf->found = 1; | 237 | buf->found = 1; |