summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-08-08 17:01:00 -0700
committerJeremy Allison <jra@samba.org>2012-08-09 12:08:18 -0700
commitb70f23c2b581c5d455362ab37f4846de9a910055 (patch)
treecf95e8d35a03d1e39d5926d2e03d7046d42cae64 /source3/lib/util.c
parentce21d0804012da27cec72abe896352d7f0e7e1e5 (diff)
downloadsamba-b70f23c2b581c5d455362ab37f4846de9a910055.tar.gz
samba-b70f23c2b581c5d455362ab37f4846de9a910055.tar.bz2
samba-b70f23c2b581c5d455362ab37f4846de9a910055.zip
Correctly check for errors in strlower_m() returns.
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 9c380c5a02..b8513f6b9f 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1892,8 +1892,14 @@ bool unix_wild_match(const char *pattern, const char *string)
TALLOC_FREE(ctx);
return false;
}
- strlower_m(p2);
- strlower_m(s2);
+ if (!strlower_m(p2)) {
+ TALLOC_FREE(ctx);
+ return false;
+ }
+ if (!strlower_m(s2)) {
+ TALLOC_FREE(ctx);
+ return false;
+ }
/* Remove any *? and ** from the pattern as they are meaningless */
for(p = p2; *p; p++) {