@@ -532,8 +532,8 @@ INTERCEPTOR(int, strncmp, const char *s1, const char *s2, usize size) {
532
532
for (; i1 < size && s1[i1]; i1++) {}
533
533
for (; i2 < size && s2[i2]; i2++) {}
534
534
}
535
- COMMON_INTERCEPTOR_READ_RANGE ((ctx), (s1), Min (i1 + 1 , size));
536
- COMMON_INTERCEPTOR_READ_RANGE ((ctx), (s2), Min (i2 + 1 , size));
535
+ COMMON_INTERCEPTOR_READ_RANGE ((ctx), (s1), Min<uptr> (i1 + 1 , size));
536
+ COMMON_INTERCEPTOR_READ_RANGE ((ctx), (s2), Min<uptr> (i2 + 1 , size));
537
537
int result = CharCmpX (c1, c2);
538
538
CALL_WEAK_INTERCEPTOR_HOOK (__sanitizer_weak_hook_strncmp, GET_CALLER_PC (), s1,
539
539
s2, size, result);
@@ -595,8 +595,8 @@ INTERCEPTOR(int, strncasecmp, const char *s1, const char *s2, SIZE_T size) {
595
595
for (; i1 < size && s1[i1]; i1++) {}
596
596
for (; i2 < size && s2[i2]; i2++) {}
597
597
}
598
- COMMON_INTERCEPTOR_READ_RANGE ((ctx), (s1), Min (i1 + 1 , size));
599
- COMMON_INTERCEPTOR_READ_RANGE ((ctx), (s2), Min (i2 + 1 , size));
598
+ COMMON_INTERCEPTOR_READ_RANGE ((ctx), (s1), Min<uptr> (i1 + 1 , size));
599
+ COMMON_INTERCEPTOR_READ_RANGE ((ctx), (s2), Min<uptr> (i2 + 1 , size));
600
600
int result = CharCaseCmp (c1, c2);
601
601
CALL_WEAK_INTERCEPTOR_HOOK (__sanitizer_weak_hook_strncasecmp, GET_CALLER_PC (),
602
602
s1, s2, size, result);
@@ -857,8 +857,8 @@ int MemcmpInterceptorCommon(void *ctx,
857
857
c2 = s2[i];
858
858
if (c1 != c2) break ;
859
859
}
860
- COMMON_INTERCEPTOR_READ_RANGE (ctx, s1, Min (i + 1 , size));
861
- COMMON_INTERCEPTOR_READ_RANGE (ctx, s2, Min (i + 1 , size));
860
+ COMMON_INTERCEPTOR_READ_RANGE (ctx, s1, Min<uptr> (i + 1 , size));
861
+ COMMON_INTERCEPTOR_READ_RANGE (ctx, s2, Min<uptr> (i + 1 , size));
862
862
int r = CharCmpX (c1, c2);
863
863
CALL_WEAK_INTERCEPTOR_HOOK (__sanitizer_weak_hook_memcmp, GET_CALLER_PC (),
864
864
a1, a2, size, r);
0 commit comments