fix #736 (ty b1gr3db)

This commit is contained in:
Andrea Fioraldi
2021-02-12 09:42:22 +01:00
parent 16ffbb37f5
commit 22a3c7f7d0
8 changed files with 3279 additions and 2290 deletions

View File

@ -1 +1 @@
47722f64e4 9a258d5b7a

File diff suppressed because it is too large Load Diff

View File

@ -174,7 +174,9 @@ char *fgets(char *s, int size, FILE *stream) {
QASAN_DEBUG("%14p: fgets(%p, %d, %p)\n", rtv, s, size, stream); QASAN_DEBUG("%14p: fgets(%p, %d, %p)\n", rtv, s, size, stream);
QASAN_STORE(s, size); QASAN_STORE(s, size);
#ifndef __ANDROID__
QASAN_LOAD(stream, sizeof(FILE)); QASAN_LOAD(stream, sizeof(FILE));
#endif
char *r = __lq_libc_fgets(s, size, stream); char *r = __lq_libc_fgets(s, size, stream);
QASAN_DEBUG("\t\t = %p\n", r); QASAN_DEBUG("\t\t = %p\n", r);

View File

@ -72,7 +72,7 @@ void __libqasan_print_maps(void) {
QASAN_LOG("QEMU-AddressSanitizer (v%s)\n", QASAN_VERSTR); QASAN_LOG("QEMU-AddressSanitizer (v%s)\n", QASAN_VERSTR);
QASAN_LOG( QASAN_LOG(
"Copyright (C) 2019-2020 Andrea Fioraldi <andreafioraldi@gmail.com>\n"); "Copyright (C) 2019-2021 Andrea Fioraldi <andreafioraldi@gmail.com>\n");
QASAN_LOG("\n"); QASAN_LOG("\n");
if (__qasan_log) __libqasan_print_maps(); if (__qasan_log) __libqasan_print_maps();

View File

@ -261,6 +261,7 @@ void* __libqasan_calloc(size_t nmemb, size_t size) {
return r; return r;
} }
#endif #endif
char *p = __libqasan_malloc(size); char *p = __libqasan_malloc(size);

View File

@ -271,7 +271,7 @@ void *__libqasan_memmem(const void *haystack, size_t haystack_len,
} }
} while (++h <= end); } while (h++ <= end);
return 0; return 0;

View File

@ -2670,3 +2670,4 @@ exit_its:
return r; return r;
} }