]> arthur.barton.de Git - netatalk.git/commitdiff
afpd/acls: fix dereference before null check error
authorRiccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Sat, 9 Feb 2013 11:07:28 +0000 (12:07 +0100)
committerRiccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Sat, 9 Feb 2013 11:07:28 +0000 (12:07 +0100)
Reported by Coverity as CID #968569.

etc/afpd/acls.c

index 55a1e3aea4262d53ee7dfbd62c1149f10af59f6c..56ffeea9fce9fd11501b38cc04b5eaa042e6f76a 100644 (file)
@@ -1363,6 +1363,8 @@ static int check_acl_access(const AFPObj *obj,
     LOG(log_maxdebug, logtype_afpd, "check_acl_access(dir: \"%s\", path: \"%s\", curdir: \"%s\", 0x%08x)",
         cfrombstr(dir->d_fullpath), path, getcwdpath(), requested_rights);
 
+    AFP_ASSERT(vol);
+
     /* This check is not used anymore, as OS X Server seems to be ignoring too */
 #if 0
     /* Get uid or gid from UUID */