summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2019-02-04 11:22:50 +1300
committerStefan Metzmacher <metze@samba.org>2019-02-26 13:00:12 +0100
commit4cd0abe3c709e4600fbd74da63a6647c7427c68b (patch)
tree874594aafabf7b614371f69b251c9d0afd564a4b
parente9afae48efa52579635aa7004f6c4a3a22dc57df (diff)
downloadsamba-4cd0abe3c709e4600fbd74da63a6647c7427c68b.tar.gz
CVE-2019-3824 ldb: Improve code style and layout in wildcard processing
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13773 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> (cherry picked from commit 9427806f7298d71bd7edfbdda7506ec63f15dda1)
-rw-r--r--lib/ldb/common/ldb_match.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/ldb/common/ldb_match.c b/lib/ldb/common/ldb_match.c
index 1920b661f75..ab0a89888f0 100644
--- a/lib/ldb/common/ldb_match.c
+++ b/lib/ldb/common/ldb_match.c
@@ -333,9 +333,11 @@ static int ldb_wildcard_compare(struct ldb_context *ldb,
g = memmem(haystack,
haystacklen,
- (const uint8_t *)cnk.data,
- cnk.length);
- if (g) p = g;
+ (const uint8_t *)cnk.data,
+ cnk.length);
+ if (g) {
+ p = g;
+ }
} while(g);
}
val.length = val.length - (p - (uint8_t *)(val.data)) - cnk.length;