• Home
  • Raw
  • Download

Lines Matching refs:strlen

79 #define strlen BUILTIN(strlen)  macro
80 size_t strlen(const char *s);
83 clang_analyzer_eval(strlen("123") == 3); // expected-warning{{TRUE}} in strlen_constant0()
88 clang_analyzer_eval(strlen(a) == 3); // expected-warning{{TRUE}} in strlen_constant1()
93 clang_analyzer_eval(strlen(a) == 3); // expected-warning{{TRUE}} in strlen_constant2()
96 clang_analyzer_eval(strlen(a) == 3); // expected-warning{{UNKNOWN}} in strlen_constant2()
100 …return strlen(0); // expected-warning{{Null pointer passed as 1st argument to string length functi… in strlen_null()
104 …return strlen((char*)&strlen_fn); // expected-warning{{Argument to string length function is the a… in strlen_fn()
109 …return strlen((char*)&&label); // expected-warning{{Argument to string length function is the addr… in strlen_nonloc()
119 size_t a = strlen(z.a); in strlen_subregion()
121 size_t b = strlen(z.a); in strlen_subregion()
127 size_t c = strlen(z.a); in strlen_subregion()
134 size_t a = strlen(x); in strlen_argument()
135 size_t b = strlen(x); in strlen_argument()
141 size_t c = strlen(x); in strlen_argument()
148 size_t a = strlen(global_str); in strlen_global()
149 size_t b = strlen(global_str); in strlen_global()
153 clang_analyzer_eval(strlen(global_str) == 0); // expected-warning{{TRUE}} in strlen_global()
159 size_t c = strlen(global_str); in strlen_global()
165 size_t a = strlen(x); in strlen_indirect()
168 size_t b = strlen(x); in strlen_indirect()
175 size_t c = strlen(x); in strlen_indirect()
181 size_t a = strlen(x); in strlen_indirect2()
187 size_t c = strlen(x); in strlen_indirect2()
193 if (strlen(x) < 5) in strlen_liveness()
195 clang_analyzer_eval(strlen(x) < 5); // expected-warning{{FALSE}} in strlen_liveness()
200 return strlen(str); in strlenWrapper()
283 clang_analyzer_eval(strnlen(x, 10) == strlen(x)); // expected-warning{{UNKNOWN}} in strnlen_is_not_strlen()
347 clang_analyzer_eval(strlen(x) == strlen(y)); // expected-warning{{TRUE}} in strcpy_effects()
355 if (strlen(y) == 4) in strcpy_overflow()
362 if (strlen(y) == 3) in strcpy_no_overflow()
388 clang_analyzer_eval(stpcpy(x, y) == &x[strlen(y)]); // expected-warning{{TRUE}} in stpcpy_effect()
389 clang_analyzer_eval(strlen(x) == strlen(y)); // expected-warning{{TRUE}} in stpcpy_effect()
396 if (strlen(y) == 4) in stpcpy_overflow()
403 if (strlen(y) == 3) in stpcpy_no_overflow()
440 size_t orig_len = strlen(x); in strcat_effects()
443 if (strlen(y) != 4) in strcat_effects()
447 clang_analyzer_eval((int)strlen(x) == (orig_len + strlen(y))); // expected-warning{{TRUE}} in strcat_effects()
453 if (strlen(y) == 4) in strcat_overflow_0()
459 if (strlen(y) == 3) in strcat_overflow_1()
465 if (strlen(y) == 2) in strcat_overflow_2()
472 if (strlen(y) == 2) in strcat_no_overflow()
478 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}} in strcat_symbolic_dst_length()
484 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}} in strcat_symbolic_dst_length_taint()
490 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}} in strcat_unknown_src_length()
498 if (strlen(dst) != (((size_t)0) - 2)) in strcat_too_big()
500 if (strlen(src) != 2) in strcat_too_big()
541 clang_analyzer_eval(strlen(x) == strlen(y)); // expected-warning{{UNKNOWN}} in strncpy_effects()
557 if (strlen(y) == 4) in strncpy_overflow()
567 if (strlen(y) == 3) in strncpy_no_overflow()
580 if (strlen(y) == 3) in strncpy_no_overflow2()
588 if (strlen(y) == 4) in strncpy_truncate()
594 if (strlen(y) == 3) in strncpy_no_truncate()
604 clang_analyzer_eval(strlen(x) > 4); // expected-warning{{UNKNOWN}} in strncpy_exactly_matching_buffer()
651 size_t orig_len = strlen(x); in strncat_effects()
654 if (strlen(y) != 4) in strncat_effects()
657 clang_analyzer_eval(strncat(x, y, strlen(y)) == x); // expected-warning{{TRUE}} in strncat_effects()
658 clang_analyzer_eval(strlen(x) == (orig_len + strlen(y))); // expected-warning{{TRUE}} in strncat_effects()
664 if (strlen(y) == 4) in strncat_overflow_0()
665 strncat(x, y, strlen(y)); in strncat_overflow_0()
671 if (strlen(y) == 3) in strncat_overflow_1()
672 strncat(x, y, strlen(y)); in strncat_overflow_1()
678 if (strlen(y) == 2) in strncat_overflow_2()
679 strncat(x, y, strlen(y)); in strncat_overflow_2()
685 if (strlen(y) == 4) in strncat_overflow_3()
693 if (strlen(y) == 2) in strncat_no_overflow_1()
694 strncat(x, y, strlen(y)); // no-warning in strncat_no_overflow_1()
699 if (strlen(y) == 4) in strncat_no_overflow_2()
705 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}} in strncat_symbolic_dst_length()
712 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}} in strncat_symbolic_src_length()
722 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}} in strncat_unknown_src_length()
738 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}} in strncat_symbolic_limit()
739 clang_analyzer_eval(strlen(dst) == 4); // expected-warning{{UNKNOWN}} in strncat_symbolic_limit()
747 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{TRUE}} in strncat_unknown_limit()
748 clang_analyzer_eval(strlen(dst) == 4); // expected-warning{{UNKNOWN}} in strncat_unknown_limit()
753 if (strlen(dst) != (((size_t)0) - 2)) in strncat_too_big()
755 if (strlen(src) != 2) in strncat_too_big()
1278 clang_analyzer_eval(strlen(str) == 4); // expected-warning{{TRUE}} in memset1_char_array_null()
1280 clang_analyzer_eval(strlen(str) == 0); // expected-warning{{TRUE}} in memset1_char_array_null()
1285 clang_analyzer_eval(strlen(str) == 4); // expected-warning{{TRUE}} in memset2_char_array_null()
1286 memset(str, '\0', strlen(str) + 1); in memset2_char_array_null()
1287 clang_analyzer_eval(strlen(str) == 0); // expected-warning{{TRUE}} in memset2_char_array_null()
1303 clang_analyzer_eval(strlen(str) == 0); // expected-warning{{TRUE}} in memset4_char_malloc_null()
1318 clang_analyzer_eval(strlen(str) == 4); // expected-warning{{TRUE}} in memset6_char_array_nonnull()
1321 clang_analyzer_eval(strlen(str) == 4); // expected-warning{{UNKNOWN}} in memset6_char_array_nonnull()
1327 clang_analyzer_eval(strlen(str) == 4); // expected-warning{{TRUE}} in memset8_char_array_nonnull()
1330 clang_analyzer_eval(strlen(str) >= 10); // expected-warning{{TRUE}} in memset8_char_array_nonnull()
1331 clang_analyzer_eval(strlen(str) < 10); // expected-warning{{FALSE}} in memset8_char_array_nonnull()
1390 clang_analyzer_eval(strlen((char *)array) == 0); // expected-warning{{TRUE}} in memset14_region_cast()
1391 clang_analyzer_eval(strlen(str) == 0); // expected-warning{{TRUE}} in memset14_region_cast()
1400 clang_analyzer_eval(strlen((char *)array) == 0); // expected-warning{{TRUE}} in memset15_region_cast()
1401 clang_analyzer_eval(strlen(str) == 0); // expected-warning{{TRUE}} in memset15_region_cast()
1454 clang_analyzer_eval(strlen(array) == 0); // expected-warning{{TRUE}} in memset25_symbol()
1463 clang_analyzer_eval(strlen(array) == 0); // expected-warning{{TRUE}} in memset26_upper_UCHAR_MAX()
1475 clang_analyzer_eval(strlen(str) == 4); // expected-warning{{TRUE}} in bzero2_char_array_null()
1477 clang_analyzer_eval(strlen(str) == 0); // expected-warning{{TRUE}} in bzero2_char_array_null()
1482 clang_analyzer_eval(strlen(str) == 4); // expected-warning{{TRUE}} in bzero3_char_ptr_null()
1484 clang_analyzer_eval(strlen(str) == 0); // expected-warning{{FALSE}} in bzero3_char_ptr_null()
1498 clang_analyzer_eval(strlen(passwd) == 0); // expected-warning{{TRUE}} in explicit_bzero2_clear_mypassword()
1529 clang_analyzer_eval(strlen(dst) >= 4); // expected-warning{{UNKNOWN}} in strcat_symbolic_src_length()
1536 if (strlen(y) >= 4) in strncpy_exactly_matching_buffer2()
1543 clang_analyzer_eval(strlen(x) <= 3); // expected-warning{{UNKNOWN}} in strncpy_exactly_matching_buffer2()
1548 clang_analyzer_eval(strlen(str) == 4); // expected-warning{{TRUE}} in memset7_char_array_nonnull()
1552 clang_analyzer_eval(strlen(str) >= 5); // expected-warning{{TRUE}} in memset7_char_array_nonnull()
1561 clang_analyzer_eval(strlen((char *)array) >= 10 * sizeof(int)); // expected-warning{{TRUE}} in memset16_region_cast()
1562 clang_analyzer_eval(strlen(str) >= 10 * sizeof(int)); // expected-warning{{TRUE}} in memset16_region_cast()
1572 clang_analyzer_eval(strlen((char *)array) >= 12 * sizeof(int)); // expected-warning{{TRUE}} in memset17_region_cast()
1573 clang_analyzer_eval(strlen(str) >= 12 * sizeof(int)); // expected-warning{{TRUE}} in memset17_region_cast()
1579 clang_analyzer_eval(strlen(str) == 0); // expected-warning{{UNKNOWN}} in memset18_memset_multiple_times()
1582 clang_analyzer_eval(strlen(str) == 0); // expected-warning{{UNKNOWN}} in memset18_memset_multiple_times()
1586 clang_analyzer_eval(strlen(str) >= 10); // expected-warning{{TRUE}} in memset18_memset_multiple_times()
1595 clang_analyzer_eval(strlen(str) == 0); // expected-warning{{UNKNOWN}} in memset19_memset_multiple_times()
1598 clang_analyzer_eval(strlen(str) >= 10); // expected-warning{{TRUE}} in memset19_memset_multiple_times()
1603 clang_analyzer_eval(strlen(str) >= 10); // expected-warning{{UNKNOWN}} in memset19_memset_multiple_times()
1618 clang_analyzer_eval(strlen(array) >= 10); // expected-warning{{TRUE}} in memset27_symbol()