]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-nfstrans-extra-protection-20080813
authorDerrick Brashear <shadow@dementia.org>
Thu, 14 Aug 2008 00:49:26 +0000 (00:49 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 14 Aug 2008 00:49:26 +0000 (00:49 +0000)
LICENSE IPL10

ensure, at least, that there is a filehandle for everything we check

(cherry picked from commit 04a25e0a4057b63cf7c700b17b1a6ab28e469547)

src/afs/afs_nfsdisp.c

index 41076ac4a6bf0555a3323396e441cfafb7a9524e..2c72374e6de1b87d7fffa06653f45fc24dfd2fb6 100644 (file)
@@ -177,7 +177,7 @@ nfs2_to_afs_call(int which, caddr_t * args, fhandle_t ** fhpp,
     }
 
     /* Ok if arg 1 is in AFS or if 2 args and arg 2 is in AFS */
-    if (is_afs_fh(fhp1)) {
+    if (fhp1 && is_afs_fh(fhp1)) {
        *fhpp = fhp1;
        if (fhp2)
            *fh2pp = fhp2;
@@ -237,7 +237,7 @@ acl2_to_afs_call(int which, caddr_t * args, fhandle_t ** fhpp)
        return NULL;
     }
 
-    if (is_afs_fh(fhp)) {
+    if (fhp && is_afs_fh(fhp)) {
        *fhpp = fhp;
        return 1;
     }
@@ -972,7 +972,7 @@ nfs3_to_afs_call(int which, caddr_t * args, nfs_fh3 ** fhpp, nfs_fh3 ** fh2pp)
        return NULL;
     }
 
-    if (is_afs_fh3(fhp1)) {
+    if (fhp1 && is_afs_fh3(fhp1)) {
        *fhpp = fhp1;
        if (fhp2)
            *fh2pp = fhp2;
@@ -1016,7 +1016,7 @@ acl3_to_afs_call(int which, caddr_t * args, nfs_fh3 ** fhpp)
        return NULL;
     }
 
-    if (is_afs_fh3(fhp)) {
+    if (fhp && is_afs_fh3(fhp)) {
        *fhpp = fhp;
        return 1;
     }