1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

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>
This commit is contained in:
Andrew Bartlett 2019-02-04 11:22:50 +13:00 committed by Stefan Metzmacher
parent 28193ca851
commit 699e2aa199

View File

@ -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;