projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d8943b
)
exportfs: don't assume that ->iterate() won't feed us too long entries
author
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 6 Sep 2013 20:55:36 +0000
(16:55 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Sat, 7 Sep 2013 23:54:55 +0000
(19:54 -0400)
On some filesystems it's impossible even with fs corruption, but we'd
better not rely on that, what with memcpy() into on-stack array we
are doing there.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/exportfs/expfs.c
patch
|
blob
|
history
diff --git
a/fs/exportfs/expfs.c
b/fs/exportfs/expfs.c
index 293bc2e47a735807a75eaad424764315172367b6..a235f0016889b557e06d6273f0f3dca7d873a608 100644
(file)
--- 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,
int result = 0;
buf->sequence++;
- if (buf->ino == ino) {
+ if (buf->ino == ino
&& len <= NAME_MAX
) {
memcpy(buf->name, name, len);
buf->name[len] = '\0';
buf->found = 1;