1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-31 22:02:58 +03:00

s4:ntvfs: use NUMERIC_CMP in stream_name_cmp

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>
This commit is contained in:
Douglas Bagnall
2024-04-03 12:52:50 +13:00
committed by Andrew Bartlett
parent 75e51bd99b
commit a6d76d6ee9

View File

@ -22,6 +22,7 @@
#include "includes.h" #include "includes.h"
#include "vfs_posix.h" #include "vfs_posix.h"
#include "librpc/gen_ndr/xattr.h" #include "librpc/gen_ndr/xattr.h"
#include "lib/util/tsort.h"
/* /*
normalise a stream name, removing a :$DATA suffix if there is one 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); l1 = c1?(c1 - name1):strlen(name1);
l2 = c2?(c2 - name2):strlen(name2); l2 = c2?(c2 - name2):strlen(name2);
if (l1 != l2) { if (l1 != l2) {
return l1 - l2; return NUMERIC_CMP(l1, l2);
} }
ret = strncasecmp_m(name1, name2, l1); ret = strncasecmp_m(name1, name2, l1);
if (ret != 0) { if (ret != 0) {