Lines Matching defs:strncpy
563 // strncpy()
571 #define strncpy(a,b,n) __strncpy_chk(a,b,n,(size_t)-1)
575 #define strncpy BUILTIN(strncpy)
576 char *strncpy(char *restrict s1, const char *restrict s2, size_t n);
582 strncpy(NULL, x, 5); // expected-warning{{Null pointer passed as 1st argument to string copy function}}
586 strncpy(x, NULL, 5); // expected-warning{{Null pointer passed as 2nd argument to string copy function}}
590 strncpy(x, (char*)&strncpy_fn_src, 5); // expected-warning{{Argument to string copy function is the address of the function 'strncpy_fn_src', which is not a null-terminated string}}
594 strncpy((char*)&strncpy_fn_dst, x, 5); // expected-warning{{Argument to string copy function is the address of the function 'strncpy_fn_dst', which is not a null-terminated string}}
600 clang_analyzer_eval(strncpy(x, y, 5) == x); // expected-warning{{TRUE}}
610 strncpy(p, "AAA", sizeof("AAA"));
618 strncpy(x, y, 5);
628 strncpy(x, y, 5);
641 strncpy(x, y, n);
649 strncpy(x, y, 3); // no-warning
655 strncpy(x, y, 3); // no-warning
660 strncpy(x, y, 4); // no-warning
662 // strncpy does not null-terminate, so we have no idea what the strlen is
669 strncpy(dst, src, 0); // no-warning
675 strncpy(dst, src, 4); // no-warning
1612 strncpy(x, y, 4); // no-warning
1756 strncpy(p, source, 100-1); // expected-warning {{String copy function overflows the destination buffer}}
1769 strncpy(data, source, 100-1); // expected-warning {{String copy function overflows the destination buffer}}