@@ -344,7 +344,7 @@ extern const short *_tolower_tab_;
344
344
#ifndef COMMON_INTERCEPTOR_STRNDUP_IMPL
345
345
#define COMMON_INTERCEPTOR_STRNDUP_IMPL (ctx, s, size ) \
346
346
COMMON_INTERCEPTOR_ENTER (ctx, strndup, s, size); \
347
- usize copy_length = internal_strnlen(s, size); \
347
+ uptr copy_length = internal_strnlen(s, size); \
348
348
char *new_mem = (char *)WRAP(malloc)(copy_length + 1 ); \
349
349
if (common_flags()->intercept_strndup) { \
350
350
COMMON_INTERCEPTOR_READ_STRING (ctx, s, Min (size, copy_length + 1 )); \
@@ -494,7 +494,7 @@ INTERCEPTOR(int, strcmp, const char *s1, const char *s2) {
494
494
void *ctx;
495
495
COMMON_INTERCEPTOR_ENTER (ctx, strcmp, s1, s2);
496
496
unsigned char c1, c2;
497
- usize i;
497
+ uptr i;
498
498
for (i = 0 ;; i++) {
499
499
c1 = (unsigned char )s1[i];
500
500
c2 = (unsigned char )s2[i];
@@ -520,14 +520,14 @@ INTERCEPTOR(int, strncmp, const char *s1, const char *s2, usize size) {
520
520
void *ctx;
521
521
COMMON_INTERCEPTOR_ENTER (ctx, strncmp, s1, s2, size);
522
522
unsigned char c1 = 0 , c2 = 0 ;
523
- usize i;
523
+ uptr i;
524
524
for (i = 0 ; i < size; i++) {
525
525
c1 = (unsigned char )s1[i];
526
526
c2 = (unsigned char )s2[i];
527
527
if (c1 != c2 || c1 == ' \0 ' ) break ;
528
528
}
529
- usize i1 = i;
530
- usize i2 = i;
529
+ uptr i1 = i;
530
+ uptr i2 = i;
531
531
if (common_flags ()->strict_string_checks ) {
532
532
for (; i1 < size && s1[i1]; i1++) {}
533
533
for (; i2 < size && s2[i2]; i2++) {}
@@ -561,7 +561,7 @@ INTERCEPTOR(int, strcasecmp, const char *s1, const char *s2) {
561
561
void *ctx;
562
562
COMMON_INTERCEPTOR_ENTER (ctx, strcasecmp, s1, s2);
563
563
unsigned char c1 = 0 , c2 = 0 ;
564
- usize i;
564
+ uptr i;
565
565
for (i = 0 ;; i++) {
566
566
c1 = (unsigned char )s1[i];
567
567
c2 = (unsigned char )s2[i];
@@ -583,14 +583,14 @@ INTERCEPTOR(int, strncasecmp, const char *s1, const char *s2, SIZE_T size) {
583
583
void *ctx;
584
584
COMMON_INTERCEPTOR_ENTER (ctx, strncasecmp, s1, s2, size);
585
585
unsigned char c1 = 0 , c2 = 0 ;
586
- usize i;
586
+ uptr i;
587
587
for (i = 0 ; i < size; i++) {
588
588
c1 = (unsigned char )s1[i];
589
589
c2 = (unsigned char )s2[i];
590
590
if (CharCaseCmp (c1, c2) != 0 || c1 == ' \0 ' ) break ;
591
591
}
592
- usize i1 = i;
593
- usize i2 = i;
592
+ uptr i1 = i;
593
+ uptr i2 = i;
594
594
if (common_flags ()->strict_string_checks ) {
595
595
for (; i1 < size && s1[i1]; i1++) {}
596
596
for (; i2 < size && s2[i2]; i2++) {}
@@ -613,8 +613,8 @@ INTERCEPTOR(int, strncasecmp, const char *s1, const char *s2, SIZE_T size) {
613
613
#if SANITIZER_INTERCEPT_STRSTR || SANITIZER_INTERCEPT_STRCASESTR
614
614
static inline void StrstrCheck (void *ctx, char *r, const char *s1,
615
615
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);
618
618
COMMON_INTERCEPTOR_READ_STRING (ctx, s1, r ? r - s1 + len2 : len1 + 1 );
619
619
COMMON_INTERCEPTOR_READ_RANGE (ctx, s2, len2 + 1 );
620
620
}
@@ -758,7 +758,7 @@ INTERCEPTOR(char*, strchrnul, const char *s, int c) {
758
758
void *ctx;
759
759
COMMON_INTERCEPTOR_ENTER (ctx, strchrnul, s, c);
760
760
char *result = REAL (strchrnul)(s, c);
761
- usize len = result - s + 1 ;
761
+ uptr len = result - s + 1 ;
762
762
if (common_flags ()->intercept_strchr )
763
763
COMMON_INTERCEPTOR_READ_STRING (ctx, s, len);
764
764
return result;
@@ -851,7 +851,7 @@ int MemcmpInterceptorCommon(void *ctx,
851
851
unsigned char c1 = 0 , c2 = 0 ;
852
852
const unsigned char *s1 = (const unsigned char *)a1;
853
853
const unsigned char *s2 = (const unsigned char *)a2;
854
- usize i;
854
+ uptr i;
855
855
for (i = 0 ; i < size; i++) {
856
856
c1 = s1[i];
857
857
c2 = s2[i];
@@ -914,7 +914,7 @@ INTERCEPTOR(void*, memchr, const void *s, int c, SIZE_T n) {
914
914
#else
915
915
void *res = REAL (memchr)(s, c, n);
916
916
#endif
917
- usize len = res ? (char *)res - (const char *)s + 1 : n;
917
+ uptr len = res ? (char *)res - (const char *)s + 1 : n;
918
918
COMMON_INTERCEPTOR_READ_RANGE (ctx, s, len);
919
919
return res;
920
920
}
0 commit comments