From: Andreas Schneider Date: Mon, 18 Feb 2013 16:11:15 +0000 (+0100) Subject: libsmb: Fix possible null pointer dereference. X-Git-Tag: tevent-0.9.18~110 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=48a453996ac161d7c7a7cb15a047e57cbdbb1e87;p=thirdparty%2Fsamba.git libsmb: Fix possible null pointer dereference. Reviewed-by: Alexander Bokovoy --- diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c index 03cdc34f928..c2ba61f88ea 100644 --- a/source3/libsmb/libsmb_xattr.c +++ b/source3/libsmb/libsmb_xattr.c @@ -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;