]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
CVE-2019-3824 ldb: Improve code style and layout in wildcard processing
authorAndrew Bartlett <abartlet@samba.org>
Sun, 3 Feb 2019 22:22:50 +0000 (11:22 +1300)
committerStefan Metzmacher <metze@samba.org>
Tue, 26 Feb 2019 11:15:12 +0000 (12:15 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13773

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
lib/ldb/common/ldb_match.c

index 9af558c7b891b6c71e6e10eb89305bf7bbeeffd8..fc1d6001a19b8318795d4e7e570f6612d544befc 100644 (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;