libsmb: Fix possible null pointer dereference. Reviewed-by: Alexander Bokovoy <ab...
authorAndreas Schneider <asn@samba.org>
Mon, 18 Feb 2013 16:11:15 +0000 (17:11 +0100)
committerKarolin Seeger <kseeger@samba.org>
Wed, 27 Feb 2013 10:40:54 +0000 (11:40 +0100)
source3/libsmb/libsmb_xattr.c

index 03cdc34f928d12798ebc8b766a0476acaec3e334..c2ba61f88ea8ac4b469d705ec143629e3ed9a87c 100644 (file)
@@ -351,7 +351,7 @@ parse_ace(struct cli_state *ipc_cli,
                goto done;
        }
 
-       for (v = standard_values; v->perm; v++) {
+       for (v = standard_values; v != NULL; v++) {
                if (strcmp(tok, v->perm) == 0) {
                        amask = v->mask;
                        goto done;
@@ -363,7 +363,7 @@ parse_ace(struct cli_state *ipc_cli,
        while(*p) {
                bool found = False;
 
-               for (v = special_values; v->perm; v++) {
+               for (v = special_values; v != NULL; v++) {
                        if (v->perm[0] == *p) {
                                amask |= v->mask;
                                found = True;