Home | History | Annotate | Download | only in Analysis

Lines Matching refs:strncpy

443 // strncpy()
451 #define strncpy(a,b,n) __strncpy_chk(a,b,n,(size_t)-1)
455 #define strncpy BUILTIN(strncpy)
456 char *strncpy(char *restrict s1, const char *restrict s2, size_t n);
462 strncpy(NULL, x, 5); // expected-warning{{Null pointer argument in call to string copy function}}
466 strncpy(x, NULL, 5); // expected-warning{{Null pointer argument in call to string copy function}}
470 strncpy(x, (char*)&strcpy_fn, 5); // expected-warning{{Argument to string copy function is the address of the function 'strcpy_fn', which is not a null-terminated string}}
476 clang_analyzer_eval(strncpy(x, y, 5) == x); // expected-warning{{TRUE}}
484 strncpy(x, y, 5); // expected-warning{{Size argument is greater than the length of the destination buffer}}
490 strncpy(x, y, 5); // expected-warning{{Size argument is greater than the length of the destination buffer}}
499 strncpy(x, y, n); // expected-warning{{Size argument is greater than the length of the destination buffer}}
505 strncpy(x, y, 3); // no-warning
511 strncpy(x, y, 3); // no-warning
516 strncpy(x, y, 4); // no-warning
518 // strncpy does not null-terminate, so we have no idea what the strlen is
525 strncpy(dst, src, 0); // no-warning
531 strncpy(dst, src, 4); // no-warning
1166 strncpy(x, y, 4); // no-warning