]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ldb:attrib_handlers: use NUMERIC_CMP in ldb_comparison_fold
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 11 Apr 2024 01:21:25 +0000 (13:21 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 7 May 2024 23:25:35 +0000 (23:25 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15625

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/ldb/common/attrib_handlers.c

index 6ae12c88eec186c4d25323a51a1bc5e6d072a612..1e3c550e40403564f2d0806e617872f14cd0d1d4 100644 (file)
@@ -426,7 +426,7 @@ utf8str:
                while (*u1 == ' ') u1++;
                while (*u2 == ' ') u2++;
        }
-       ret = (int)(*u1 - *u2);
+       ret = NUMERIC_CMP(*u1, *u2);
 
        talloc_free(b1);
        talloc_free(b2);