Commit 4f082222 authored by Trond Myklebust's avatar Trond Myklebust

NFSv4: nfs4_decode_dirent must clear entry->fattr->valid

Otherwise, we may end up reading uninitialised data from the resulting
struct nfs_fattr.
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 3201f3dd
...@@ -5815,6 +5815,7 @@ __be32 *nfs4_decode_dirent(struct xdr_stream *xdr, struct nfs_entry *entry, ...@@ -5815,6 +5815,7 @@ __be32 *nfs4_decode_dirent(struct xdr_stream *xdr, struct nfs_entry *entry,
* since glibc seems to choke on it...) * since glibc seems to choke on it...)
*/ */
entry->ino = 1; entry->ino = 1;
entry->fattr->valid = 0;
len = ntohl(*p++); /* bitmap length */ len = ntohl(*p++); /* bitmap length */
if (len-- > 0) { if (len-- > 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment