From: Douglas Bagnall Date: Thu, 11 Apr 2024 01:21:25 +0000 (+1200) Subject: ldb:attrib_handlers: use NUMERIC_CMP in ldb_comparison_fold X-Git-Tag: tdb-1.4.11~814 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f81b7c7eb206a447d799a25cc2da26304dc7567a;p=thirdparty%2Fsamba.git ldb:attrib_handlers: use NUMERIC_CMP in ldb_comparison_fold BUG: https://bugzilla.samba.org/show_bug.cgi?id=15625 Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/lib/ldb/common/attrib_handlers.c b/lib/ldb/common/attrib_handlers.c index 6ae12c88eec..1e3c550e404 100644 --- a/lib/ldb/common/attrib_handlers.c +++ b/lib/ldb/common/attrib_handlers.c @@ -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);