Lines Matching refs:small_buffer
169 char small_buffer[8] = {}; in FORTIFY_TEST() local
172 char large_buffer[sizeof(small_buffer) + 1] = {}; in FORTIFY_TEST()
174 EXPECT_FORTIFY_DEATH(memcpy(small_buffer, large_buffer, sizeof(large_buffer))); in FORTIFY_TEST()
176 EXPECT_FORTIFY_DEATH(memmove(small_buffer, large_buffer, sizeof(large_buffer))); in FORTIFY_TEST()
180 EXPECT_FORTIFY_DEATH(mempcpy(small_buffer, large_buffer, sizeof(large_buffer))); in FORTIFY_TEST()
182 EXPECT_FORTIFY_DEATH(memset(small_buffer, 0, sizeof(large_buffer))); in FORTIFY_TEST()
184 EXPECT_NO_DEATH(memset(small_buffer, sizeof(small_buffer), 0)); in FORTIFY_TEST()
186 EXPECT_FORTIFY_DEATH(bcopy(large_buffer, small_buffer, sizeof(large_buffer))); in FORTIFY_TEST()
188 EXPECT_FORTIFY_DEATH(bzero(small_buffer, sizeof(large_buffer))); in FORTIFY_TEST()
193 static_assert(sizeof(large_string) > sizeof(small_buffer), ""); in FORTIFY_TEST()
196 EXPECT_FORTIFY_DEATH(strcpy(small_buffer, large_string)); in FORTIFY_TEST()
198 EXPECT_FORTIFY_DEATH(stpcpy(small_buffer, large_string)); in FORTIFY_TEST()
200 EXPECT_FORTIFY_DEATH(strncpy(small_buffer, large_string, sizeof(large_string))); in FORTIFY_TEST()
202 EXPECT_FORTIFY_DEATH(stpncpy(small_buffer, large_string, sizeof(large_string))); in FORTIFY_TEST()
204 EXPECT_FORTIFY_DEATH(strcat(small_buffer, large_string)); in FORTIFY_TEST()
206 EXPECT_FORTIFY_DEATH(strncat(small_buffer, large_string, sizeof(large_string))); in FORTIFY_TEST()
208 EXPECT_FORTIFY_DEATH(strlcpy(small_buffer, large_string, sizeof(large_string))); in FORTIFY_TEST()
210 EXPECT_FORTIFY_DEATH(strlcat(small_buffer, large_string, sizeof(large_string))); in FORTIFY_TEST()
475 char small_buffer[8]; in FORTIFY_TEST() local
477 EXPECT_FORTIFY_DEATH(recv(kBogusFD, small_buffer, sizeof(small_buffer) + 1, 0)); in FORTIFY_TEST()
479 EXPECT_FORTIFY_DEATH(recvfrom(kBogusFD, small_buffer, sizeof(small_buffer) + 1, 0, 0, 0)); in FORTIFY_TEST()
482 EXPECT_FORTIFY_DEATH(send(kBogusFD, small_buffer, sizeof(small_buffer) + 1, 0)); in FORTIFY_TEST()
484 EXPECT_FORTIFY_DEATH(sendto(kBogusFD, small_buffer, sizeof(small_buffer) + 1, 0, 0, 0)); in FORTIFY_TEST()
504 char small_buffer[8] = {}; in FORTIFY_TEST() local
507 EXPECT_FORTIFY_DEATH(snprintf(small_buffer, sizeof(small_buffer) + 1, "")); in FORTIFY_TEST()
512 EXPECT_FORTIFY_DEATH(vsnprintf(small_buffer, sizeof(small_buffer) + 1, "", va)); in FORTIFY_TEST()
517 EXPECT_FORTIFY_DEATH(sprintf(small_buffer, format_string)); in FORTIFY_TEST()
521 EXPECT_FORTIFY_DEATH(fgets(small_buffer, -1, stdin)); in FORTIFY_TEST()
523 EXPECT_FORTIFY_DEATH(fgets(small_buffer, sizeof(small_buffer) + 1, stdin)); in FORTIFY_TEST()
526 EXPECT_NO_DEATH(fread(small_buffer, 2, (size_t)-1, stdin)); in FORTIFY_TEST()
528 EXPECT_FORTIFY_DEATH(fread(small_buffer, 1, sizeof(small_buffer) + 1, stdin)); in FORTIFY_TEST()
531 EXPECT_NO_DEATH(fwrite(small_buffer, 2, (size_t)-1, stdout)); in FORTIFY_TEST()
533 EXPECT_FORTIFY_DEATH(fwrite(small_buffer, 1, sizeof(small_buffer) + 1, stdout)); in FORTIFY_TEST()
537 char small_buffer[8]; in FORTIFY_TEST() local
544 EXPECT_FORTIFY_DEATH(read(kBogusFD, small_buffer, sizeof(small_buffer) + 1)); in FORTIFY_TEST()
549 EXPECT_FORTIFY_DEATH(pread(kBogusFD, small_buffer, sizeof(small_buffer) + 1, 0)); in FORTIFY_TEST()
554 EXPECT_FORTIFY_DEATH(pread64(kBogusFD, small_buffer, sizeof(small_buffer) + 1, 0)); in FORTIFY_TEST()
559 EXPECT_FORTIFY_DEATH(write(kBogusFD, small_buffer, sizeof(small_buffer) + 1)); in FORTIFY_TEST()
564 EXPECT_FORTIFY_DEATH(pwrite(kBogusFD, small_buffer, sizeof(small_buffer) + 1, 0)); in FORTIFY_TEST()
569 EXPECT_FORTIFY_DEATH(pwrite64(kBogusFD, small_buffer, sizeof(small_buffer) + 1, 0)); in FORTIFY_TEST()
574 EXPECT_FORTIFY_DEATH(readlink("/", small_buffer, sizeof(small_buffer) + 1)); in FORTIFY_TEST()
579 EXPECT_FORTIFY_DEATH(getcwd(small_buffer, sizeof(small_buffer) + 1)); in FORTIFY_TEST()
607 char* volatile unknown = small_buffer; in FORTIFY_TEST()