@@ -344,7 +344,7 @@ extern const short *_tolower_tab_;
344344#ifndef COMMON_INTERCEPTOR_STRNDUP_IMPL
345345#define COMMON_INTERCEPTOR_STRNDUP_IMPL (ctx, s, size ) \
346346 COMMON_INTERCEPTOR_ENTER (ctx, strndup, s, size); \
347- usize copy_length = internal_strnlen(s, size); \
347+ uptr copy_length = internal_strnlen(s, size); \
348348 char *new_mem = (char *)WRAP(malloc)(copy_length + 1 ); \
349349 if (common_flags()->intercept_strndup) { \
350350 COMMON_INTERCEPTOR_READ_STRING (ctx, s, Min (size, copy_length + 1 )); \
@@ -494,7 +494,7 @@ INTERCEPTOR(int, strcmp, const char *s1, const char *s2) {
494494 void *ctx;
495495 COMMON_INTERCEPTOR_ENTER (ctx, strcmp, s1, s2);
496496 unsigned char c1, c2;
497- usize i;
497+ uptr i;
498498 for (i = 0 ;; i++) {
499499 c1 = (unsigned char )s1[i];
500500 c2 = (unsigned char )s2[i];
@@ -520,14 +520,14 @@ INTERCEPTOR(int, strncmp, const char *s1, const char *s2, usize size) {
520520 void *ctx;
521521 COMMON_INTERCEPTOR_ENTER (ctx, strncmp, s1, s2, size);
522522 unsigned char c1 = 0 , c2 = 0 ;
523- usize i;
523+ uptr i;
524524 for (i = 0 ; i < size; i++) {
525525 c1 = (unsigned char )s1[i];
526526 c2 = (unsigned char )s2[i];
527527 if (c1 != c2 || c1 == ' \0 ' ) break ;
528528 }
529- usize i1 = i;
530- usize i2 = i;
529+ uptr i1 = i;
530+ uptr i2 = i;
531531 if (common_flags ()->strict_string_checks ) {
532532 for (; i1 < size && s1[i1]; i1++) {}
533533 for (; i2 < size && s2[i2]; i2++) {}
@@ -561,7 +561,7 @@ INTERCEPTOR(int, strcasecmp, const char *s1, const char *s2) {
561561 void *ctx;
562562 COMMON_INTERCEPTOR_ENTER (ctx, strcasecmp, s1, s2);
563563 unsigned char c1 = 0 , c2 = 0 ;
564- usize i;
564+ uptr i;
565565 for (i = 0 ;; i++) {
566566 c1 = (unsigned char )s1[i];
567567 c2 = (unsigned char )s2[i];
@@ -583,14 +583,14 @@ INTERCEPTOR(int, strncasecmp, const char *s1, const char *s2, SIZE_T size) {
583583 void *ctx;
584584 COMMON_INTERCEPTOR_ENTER (ctx, strncasecmp, s1, s2, size);
585585 unsigned char c1 = 0 , c2 = 0 ;
586- usize i;
586+ uptr i;
587587 for (i = 0 ; i < size; i++) {
588588 c1 = (unsigned char )s1[i];
589589 c2 = (unsigned char )s2[i];
590590 if (CharCaseCmp (c1, c2) != 0 || c1 == ' \0 ' ) break ;
591591 }
592- usize i1 = i;
593- usize i2 = i;
592+ uptr i1 = i;
593+ uptr i2 = i;
594594 if (common_flags ()->strict_string_checks ) {
595595 for (; i1 < size && s1[i1]; i1++) {}
596596 for (; i2 < size && s2[i2]; i2++) {}
@@ -613,8 +613,8 @@ INTERCEPTOR(int, strncasecmp, const char *s1, const char *s2, SIZE_T size) {
613613#if SANITIZER_INTERCEPT_STRSTR || SANITIZER_INTERCEPT_STRCASESTR
614614static inline void StrstrCheck (void *ctx, char *r, const char *s1,
615615 const char *s2) {
616- usize len1 = internal_strlen (s1);
617- usize len2 = internal_strlen (s2);
616+ uptr len1 = internal_strlen (s1);
617+ uptr len2 = internal_strlen (s2);
618618 COMMON_INTERCEPTOR_READ_STRING (ctx, s1, r ? r - s1 + len2 : len1 + 1 );
619619 COMMON_INTERCEPTOR_READ_RANGE (ctx, s2, len2 + 1 );
620620}
@@ -758,7 +758,7 @@ INTERCEPTOR(char*, strchrnul, const char *s, int c) {
758758 void *ctx;
759759 COMMON_INTERCEPTOR_ENTER (ctx, strchrnul, s, c);
760760 char *result = REAL (strchrnul)(s, c);
761- usize len = result - s + 1 ;
761+ uptr len = result - s + 1 ;
762762 if (common_flags ()->intercept_strchr )
763763 COMMON_INTERCEPTOR_READ_STRING (ctx, s, len);
764764 return result;
@@ -851,7 +851,7 @@ int MemcmpInterceptorCommon(void *ctx,
851851 unsigned char c1 = 0 , c2 = 0 ;
852852 const unsigned char *s1 = (const unsigned char *)a1;
853853 const unsigned char *s2 = (const unsigned char *)a2;
854- usize i;
854+ uptr i;
855855 for (i = 0 ; i < size; i++) {
856856 c1 = s1[i];
857857 c2 = s2[i];
@@ -914,7 +914,7 @@ INTERCEPTOR(void*, memchr, const void *s, int c, SIZE_T n) {
914914#else
915915 void *res = REAL (memchr)(s, c, n);
916916#endif
917- usize len = res ? (char *)res - (const char *)s + 1 : n;
917+ uptr len = res ? (char *)res - (const char *)s + 1 : n;
918918 COMMON_INTERCEPTOR_READ_RANGE (ctx, s, len);
919919 return res;
920920}
0 commit comments