Lines Matching defs:from

353 void *__asan_memcpy(void *to, const void *from, uptr size) {
354 if (UNLIKELY(!asan_inited)) return internal_memcpy(to, from, size);
355 // memcpy is called during __asan_init() from the internals
358 return REAL(memcpy)(to, from, size);
362 if (to != from) {
363 // We do not treat memcpy with to==from as a bug.
365 CHECK_RANGES_OVERLAP("memcpy", to, size, from, size);
367 ASAN_READ_RANGE(from, size);
370 return REAL(memcpy)(to, from, size);
386 void *__asan_memmove(void *to, const void *from, uptr size) {
388 return internal_memmove(to, from, size);
391 ASAN_READ_RANGE(from, size);
394 return internal_memmove(to, from, size);
397 INTERCEPTOR(void*, memmove, void *to, const void *from, uptr size) {
398 return __asan_memmove(to, from, size);
401 INTERCEPTOR(void*, memcpy, void *to, const void *from, uptr size) {
403 return __asan_memcpy(to, from, size);
411 return __asan_memmove(to, from, size);
450 // argument irrespective of the |from| length.
451 INTERCEPTOR(char*, strcat, char *to, const char *from) { // NOLINT
454 uptr from_length = REAL(strlen)(from);
455 ASAN_READ_RANGE(from, from_length + 1);
459 // If the copying actually happens, the |from| string should not overlap
464 from, from_length + 1);
467 return REAL(strcat)(to, from); // NOLINT
470 INTERCEPTOR(char*, strncat, char *to, const char *from, uptr size) {
473 uptr from_length = MaybeRealStrnlen(from, size);
475 ASAN_READ_RANGE(from, copy_length);
481 from, copy_length);
484 return REAL(strncat)(to, from, size);
487 INTERCEPTOR(char*, strcpy, char *to, const char *from) { // NOLINT
489 if (UNLIKELY(!asan_inited)) return REAL(strcpy)(to, from); // NOLINT
491 // strcpy is called from malloc_default_purgeable_zone()
494 return REAL(strcpy)(to, from); // NOLINT
498 uptr from_size = REAL(strlen)(from) + 1;
499 CHECK_RANGES_OVERLAP("strcpy", to, from_size, from, from_size);
500 ASAN_READ_RANGE(from, from_size);
503 return REAL(strcpy)(to, from); // NOLINT
523 // strlen is called from malloc_default_purgeable_zone()
545 INTERCEPTOR(char*, strncpy, char *to, const char *from, uptr size) {
548 uptr from_size = Min(size, MaybeRealStrnlen(from, size) + 1);
549 CHECK_RANGES_OVERLAP("strncpy", to, from_size, from, from_size);
550 ASAN_READ_RANGE(from, from_size);
553 return REAL(strncpy)(to, from, size);
614 // different from int). So, we just imitate this behavior.