pioctl-write-null-before-copyout-20020814
authorDerrick Brashear <shadow@dementia.org>
Wed, 14 Aug 2002 22:18:34 +0000 (22:18 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 14 Aug 2002 22:18:34 +0000 (22:18 +0000)
suggested by lha@stacken.kth.se

src/afs/afs_pioctl.c

index 945c07e..9168088 100644 (file)
@@ -1106,8 +1106,8 @@ afs_HandlePioctl(avc, acom, ablob, afollow, acred)
       if (outSize > ablob->out_size) outSize = ablob->out_size;
       if (outSize >= PIGGYSIZE) code = E2BIG;
       else if  (outSize) {
-       AFS_COPYOUT(outData, ablob->out, outSize, code);
        outData[outSize]='\0';
+       AFS_COPYOUT(outData, ablob->out, outSize, code);
       }
     }
     osi_FreeLargeSpace(outData);