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 12:15:12 +0100
commit5d6df9adbfd279cc0da7d5cae90cd724b635e97c (patch)
tree6e189e47bca0a2e83d1bb0fbdf87768d408859f0
parenta3c42ff9331642ea989cba20175b7813050b9f5f (diff)
downloadsamba-5d6df9adbfd279cc0da7d5cae90cd724b635e97c.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>
-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 9af558c7b89..fc1d6001a19 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;