From: Andrew Bartlett Date: Sun, 3 Feb 2019 22:22:50 +0000 (+1300) Subject: CVE-2019-3824 ldb: Improve code style and layout in wildcard processing X-Git-Tag: ldb-1.3.8~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=699e2aa19946d43b162355dcb299a1dd798c9cd7;p=thirdparty%2Fsamba.git 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 --- 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;