solaris-init-offset-for-write-20050929
authorChas Williams <chas@cmf.nrl.navy.mil>
Thu, 29 Sep 2005 21:34:55 +0000 (21:34 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 29 Sep 2005 21:34:55 +0000 (21:34 +0000)
passing a random nlen into afs_GetDCache() when in write mode
seems to sometimes trigger overwrites.

src/afs/SOLARIS/osi_vnodeops.c

index d4c0590..08ee7af 100644 (file)
@@ -266,7 +266,7 @@ afs_GetOnePage(vp, off, alen, protp, pl, plsz, seg, addr, rw, acred)
     register struct dcache *tdc;
     int i, s, pexists;
     int slot;
-    afs_size_t offset, nlen;
+    afs_size_t offset = 0, nlen;
     struct vrequest treq;
     afs_int32 mapForRead = 0, Code = 0;
     u_offset_t toffset;