NFS server: Zero not-fully-initialized UIO structure.
authorVenkatesh Srinivas <me@endeavour.zapto.org>
Sat, 24 Dec 2011 18:26:17 +0000 (10:26 -0800)
committerVenkatesh Srinivas <me@endeavour.zapto.org>
Sat, 24 Dec 2011 18:26:17 +0000 (10:26 -0800)
From: OpenBSD nfs_serv.c 1.90

sys/vfs/nfs/nfs_serv.c

index 066dda3..f6cd529 100644 (file)
@@ -700,6 +700,8 @@ nfsrv_readlink(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
        info.dpos = nfsd->nd_dpos;
        info.v3 = (nfsd->nd_flag & ND_NFSV3);
 
+       bzero(&io, sizeof(struct uio));
+
        nfsdbprintf(("%s %d\n", __FILE__, __LINE__));
 #ifndef nolint
        mp2 = NULL;