]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-pioctl-buffer-size-checking-20030515
authorJim Rees <rees@umich.edu>
Thu, 15 May 2003 16:12:36 +0000 (16:12 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 15 May 2003 16:12:36 +0000 (16:12 +0000)
don't check output buffer size against PIGGY

(cherry picked from commit 19b1a9015f5546881c3c077e4c39d2b8d167dfc5)

src/afs/afs_pioctl.c

index bbe233f0a7b472406e92216c8d1a7ed0f8526c32..36e5a172dbf6f9b77deb2e3e05fbf68349729ad6 100644 (file)
@@ -1084,10 +1084,10 @@ afs_HandlePioctl(avc, acom, ablob, afollow, acred)
        return EINVAL;  /* out of range */
     }
     inSize = ablob->in_size;
-    
+
     /* Do all range checking before continuing */
-    if ((inSize >= PIGGYSIZE) || (inSize < 0)) return E2BIG;
-    if ((ablob->out_size >= PIGGYSIZE) || (ablob->out_size < 0)) return E2BIG;
+    if (inSize >= PIGGYSIZE || inSize < 0 || ablob->out_size < 0)
+       return E2BIG;
 
     inData = osi_AllocLargeSpace(AFS_LRALLOCSIZ);
     if (inSize > 0) {