summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-02-18 17:11:15 +0100
committerAlexander Bokovoy <ab@samba.org>2013-02-22 16:36:12 +0100
commit48a453996ac161d7c7a7cb15a047e57cbdbb1e87 (patch)
tree71555e4fafca92f31be4cf3191929dc9c5364b1b /source3/libsmb
parent8bfbb81bcd5a70280f49fbe3ab67ccf035fdeade (diff)
downloadsamba-48a453996ac161d7c7a7cb15a047e57cbdbb1e87.tar.gz
samba-48a453996ac161d7c7a7cb15a047e57cbdbb1e87.tar.bz2
samba-48a453996ac161d7c7a7cb15a047e57cbdbb1e87.zip
libsmb: Fix possible null pointer dereference.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/libsmb_xattr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c
index 03cdc34f92..c2ba61f88e 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;