From: Douglas Bagnall Date: Tue, 2 Apr 2024 23:52:50 +0000 (+1300) Subject: s4:ntvfs: use NUMERIC_CMP in stream_name_cmp X-Git-Tag: tdb-1.4.11~1177 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=a6d76d6ee9f7cfcabe2c20b872b8b1cb598928a6;p=thirdparty%2Fsamba.git s4:ntvfs: use NUMERIC_CMP in stream_name_cmp BUG: https://bugzilla.samba.org/show_bug.cgi?id=15625 Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/source4/ntvfs/posix/pvfs_streams.c b/source4/ntvfs/posix/pvfs_streams.c index 92102371674..d2d5eed1354 100644 --- a/source4/ntvfs/posix/pvfs_streams.c +++ b/source4/ntvfs/posix/pvfs_streams.c @@ -22,6 +22,7 @@ #include "includes.h" #include "vfs_posix.h" #include "librpc/gen_ndr/xattr.h" +#include "lib/util/tsort.h" /* normalise a stream name, removing a :$DATA suffix if there is one @@ -51,7 +52,7 @@ static int stream_name_cmp(const char *name1, const char *name2) l1 = c1?(c1 - name1):strlen(name1); l2 = c2?(c2 - name2):strlen(name2); if (l1 != l2) { - return l1 - l2; + return NUMERIC_CMP(l1, l2); } ret = strncasecmp_m(name1, name2, l1); if (ret != 0) {