diff options
author | Andrew Bartlett <abartlet@samba.org> | 2019-02-04 11:22:50 +1300 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2019-02-26 07:50:15 +0100 |
commit | 33fa01b4be0d70c880a82069cd264c618b981822 (patch) | |
tree | b9fc9938f476e17ae4f372a654dd1a7b98320179 /lib | |
parent | cedc4e89625c98ac5607f8a4facef933e6bf04ca (diff) | |
download | samba-33fa01b4be0d70c880a82069cd264c618b981822.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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ldb/common/ldb_match.c | 8 |
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; |