]> 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)
committerJule Anger <janger@samba.org>
Mon, 10 Jun 2024 13:25:17 +0000 (13: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>
(cherry picked from commit f81b7c7eb206a447d799a25cc2da26304dc7567a)

lib/ldb/common/attrib_handlers.c

index c01477331f00cc9e54dcc98493d70f68346b9753..75838b4e4095299b10381a1b129755f4b93c577a 100644 (file)
@@ -425,7 +425,7 @@ utf8str:
                while (*u1 == ' ') u1++;
                while (*u2 == ' ') u2++;
        }
-       ret = (int)(*u1 - *u2);
+       ret = NUMERIC_CMP(*u1, *u2);
 
        talloc_free(b1);
        talloc_free(b2);