Lines Matching full:buf
363 char buf[10];
365 ASSERT_FORTIFY(strcpy(buf, orig));
375 char buf[0];
377 ASSERT_FORTIFY(strcpy(buf, orig));
387 char buf[0];
389 ASSERT_FORTIFY(strcpy(buf, orig));
399 char buf[1];
401 ASSERT_FORTIFY(strcpy(buf, orig));
410 char buf[10];
411 memcpy(buf, "0123456789", sizeof(buf));
412 ASSERT_FORTIFY(printf("%zd", strlen(buf)));
420 char buf[10];
421 memcpy(buf, "0123456789", sizeof(buf));
422 ASSERT_FORTIFY(printf("%s", strchr(buf, 'a')));
430 char buf[10];
431 memcpy(buf, "0123456789", sizeof(buf));
432 ASSERT_FORTIFY(printf("%s", strrchr(buf, 'a')));
464 char buf[10];
467 ASSERT_FORTIFY(sprintf(buf, "%s", source_buf));
474 char* buf = (char *) malloc(10);
477 ASSERT_FORTIFY(sprintf(buf, "%s", source_buf));
478 free(buf);
483 char buf[5];
484 ASSERT_FORTIFY(sprintf(buf, "aaaaa"));
488 char buf[10];
493 result = vsprintf(buf, fmt, va); // should crash here
507 char buf[10];
513 result = vsnprintf(buf, size, fmt, va); // should crash here
527 char buf[10];
529 strncpy(buf, "012345678", n);
530 ASSERT_FORTIFY(strncat(buf, "9", n));
534 char buf[10];
535 buf[0] = '\0';
537 ASSERT_FORTIFY(strncat(buf, "0123456789", n));
543 char buf[10];
544 buf[0] = '\0';
545 ASSERT_FORTIFY(strcat(buf, src));
549 char buf[20];
550 strcpy(buf, "0123456789");
552 ASSERT_FORTIFY(memmove(buf + 11, buf, n));
603 char buf[10];
604 memcpy(buf, "0123456789", sizeof(buf));
606 ASSERT_FORTIFY(bzero(buf, n));
616 char buf[10];
617 ASSERT_FORTIFY(recv(0, buf, data_len, 0));
629 char buf[1];
630 fd_set* set = (fd_set*) buf;
635 char buf[1];
637 ASSERT_FORTIFY(getcwd(buf, ct));
641 char buf[1];
644 ASSERT_FORTIFY(pread(fd, buf, ct, 0));
649 char buf[1];
652 ASSERT_FORTIFY(pread64(fd, buf, ct, 0));
657 char buf[1] = {0};
660 ASSERT_FORTIFY(pwrite(fd, buf, ct, 0));
665 char buf[1] = {0};
668 ASSERT_FORTIFY(pwrite64(fd, buf, ct, 0));
673 char buf[1];
676 ASSERT_FORTIFY(read(fd, buf, ct));
681 char buf[1] = {0};
684 ASSERT_EXIT(write(fd, buf, ct), testing::KilledBySignal(SIGABRT), "");
689 char buf[1];
692 ASSERT_FORTIFY(fread(buf, 1, ct, fp));
697 char buf[1] = {0};
700 ASSERT_FORTIFY(fwrite(buf, 1, ct, fp));
705 char buf[1];
707 ASSERT_FORTIFY(readlink("/dev/null", buf, ct));
711 char buf[1];
713 ASSERT_FORTIFY(readlinkat(AT_FDCWD, "/dev/null", buf, ct));
720 char buf[10];
721 memset(buf, 'A', sizeof(buf));
722 buf[0] = 'a';
723 buf[1] = '\0';
724 char* res = __strncat_chk(buf, "01234", sizeof(buf) - strlen(buf) - 1, sizeof(buf));
725 ASSERT_EQ(buf, res);
726 ASSERT_EQ('a', buf[0]);
727 ASSERT_EQ('0', buf[1]);
728 ASSERT_EQ('1', buf[2]);
729 ASSERT_EQ('2', buf[3]);
730 ASSERT_EQ('3', buf[4]);
731 ASSERT_EQ('4', buf[5]);
732 ASSERT_EQ('\0', buf[6]);
733 ASSERT_EQ('A', buf[7]);
734 ASSERT_EQ('A', buf[8]);
735 ASSERT_EQ('A', buf[9]);
739 char buf[10];
740 memset(buf, 'A', sizeof(buf));
741 buf[0] = 'a';
742 buf[1] = '\0';
743 char* res = __strncat_chk(buf, "0123456789", 5, sizeof(buf));
744 ASSERT_EQ(buf, res);
745 ASSERT_EQ('a', buf[0]);
746 ASSERT_EQ('0', buf[1]);
747 ASSERT_EQ('1', buf[2]);
748 ASSERT_EQ('2', buf[3]);
749 ASSERT_EQ('3', buf[4]);
750 ASSERT_EQ('4', buf[5]);
751 ASSERT_EQ('\0', buf[6]);
752 ASSERT_EQ('A', buf[7]);
753 ASSERT_EQ('A', buf[8]);
754 ASSERT_EQ('A', buf[9]);
758 char buf[10];
759 memset(buf, 'A', sizeof(buf));
760 buf[0] = '\0';
761 char* res = __strncat_chk(buf, "0123456789", 5, sizeof(buf));
762 ASSERT_EQ(buf, res);
763 ASSERT_EQ('0', buf[0]);
764 ASSERT_EQ('1', buf[1]);
765 ASSERT_EQ('2', buf[2]);
766 ASSERT_EQ('3', buf[3]);
767 ASSERT_EQ('4', buf[4]);
768 ASSERT_EQ('\0', buf[5]);
769 ASSERT_EQ('A', buf[6]);
770 ASSERT_EQ('A', buf[7]);
771 ASSERT_EQ('A', buf[8]);
772 ASSERT_EQ('A', buf[9]);
776 char buf[10];
777 memset(buf, 'A', sizeof(buf));
778 buf[9] = '\0';
779 char* res = __strncat_chk(buf, "", 5, sizeof(buf));
780 ASSERT_EQ(buf, res);
781 ASSERT_EQ('A', buf[0]);
782 ASSERT_EQ('A', buf[1]);
783 ASSERT_EQ('A', buf[2]);
784 ASSERT_EQ('A', buf[3]);
785 ASSERT_EQ('A', buf[4]);
786 ASSERT_EQ('A', buf[5]);
787 ASSERT_EQ('A', buf[6]);
788 ASSERT_EQ('A', buf[7]);
789 ASSERT_EQ('A', buf[8]);
790 ASSERT_EQ('\0', buf[9]);
794 char buf[10];
795 memset(buf, 'A', sizeof(buf));
796 buf[0] = 'a';
797 buf[1] = '\0';
798 char* res = __strncat_chk(buf, "01234567", 8, sizeof(buf));
799 ASSERT_EQ(buf, res);
800 ASSERT_EQ('a', buf[0]);
801 ASSERT_EQ('0', buf[1]);
802 ASSERT_EQ('1', buf[2]);
803 ASSERT_EQ('2', buf[3]);
804 ASSERT_EQ('3', buf[4]);
805 ASSERT_EQ('4', buf[5]);
806 ASSERT_EQ('5', buf[6]);
807 ASSERT_EQ('6', buf[7]);
808 ASSERT_EQ('7', buf[8]);
809 ASSERT_EQ('\0', buf[9]);
813 char buf[10];
814 memset(buf, 'A', sizeof(buf));
815 buf[0] = 'a';
816 buf[1] = '\0';
817 char* res = __strncat_chk(buf, "01234567", 9, sizeof(buf));
818 ASSERT_EQ(buf, res);
819 ASSERT_EQ('a', buf[0]);
820 ASSERT_EQ('0', buf[1]);
821 ASSERT_EQ('1', buf[2]);
822 ASSERT_EQ('2', buf[3]);
823 ASSERT_EQ('3', buf[4]);
824 ASSERT_EQ('4', buf[5]);
825 ASSERT_EQ('5', buf[6]);
826 ASSERT_EQ('6', buf[7]);
827 ASSERT_EQ('7', buf[8]);
828 ASSERT_EQ('\0', buf[9]);
833 char buf[10];
834 memset(buf, 'A', sizeof(buf));
835 buf[0] = 'a';
836 buf[1] = '\0';
837 char* res = __strcat_chk(buf, "01234", sizeof(buf));
838 ASSERT_EQ(buf, res);
839 ASSERT_EQ('a', buf[0]);
840 ASSERT_EQ('0', buf[1]);
841 ASSERT_EQ('1', buf[2]);
842 ASSERT_EQ('2', buf[3]);
843 ASSERT_EQ('3', buf[4]);
844 ASSERT_EQ('4', buf[5]);
845 ASSERT_EQ('\0', buf[6]);
846 ASSERT_EQ('A', buf[7]);
847 ASSERT_EQ('A', buf[8]);
848 ASSERT_EQ('A', buf[9]);
852 char buf[10];
853 memset(buf, 'A', sizeof(buf));
854 buf[0] = 'a';
855 buf[1] = '\0';
856 char* res = __strcat_chk(buf, "01234567", sizeof(buf));
857 ASSERT_EQ(buf, res);
858 ASSERT_EQ('a', buf[0]);
859 ASSERT_EQ('0', buf[1]);
860 ASSERT_EQ('1', buf[2]);
861 ASSERT_EQ('2', buf[3]);
862 ASSERT_EQ('3', buf[4]);
863 ASSERT_EQ('4', buf[5]);
864 ASSERT_EQ('5', buf[6]);
865 ASSERT_EQ('6', buf[7]);
866 ASSERT_EQ('7', buf[8]);
867 ASSERT_EQ('\0', buf[9]);
949 char buf[10];
950 memset(buf, 'A', sizeof(buf));
951 buf[0] = 'a';
952 buf[1] = '\0';
953 char* res = __strcat_chk(buf, "01234567", (size_t)-1);
954 ASSERT_EQ(buf, res);
955 ASSERT_EQ('a', buf[0]);
956 ASSERT_EQ('0', buf[1]);
957 ASSERT_EQ('1', buf[2]);
958 ASSERT_EQ('2', buf[3]);
959 ASSERT_EQ('3', buf[4]);
960 ASSERT_EQ('4', buf[5]);
961 ASSERT_EQ('5', buf[6]);
962 ASSERT_EQ('6', buf[7]);
963 ASSERT_EQ('7', buf[8]);
964 ASSERT_EQ('\0', buf[9]);
970 char buf[10];
971 char* res = __stpcpy_chk(buf, "012345678", (size_t)-1);
972 ASSERT_EQ(buf + strlen("012345678"), res);
973 ASSERT_STREQ("012345678", buf);
979 char buf[10];
980 char* res = __strcpy_chk(buf, "012345678", (size_t)-1);
981 ASSERT_EQ(buf, res);
982 ASSERT_STREQ("012345678", buf);
988 char buf[10];
989 void* res = __memcpy_chk(buf, "012345678", sizeof(buf), (size_t)-1);
990 ASSERT_EQ((void*)buf, res);
991 ASSERT_EQ('0', buf[0]);
992 ASSERT_EQ('1', buf[1]);
993 ASSERT_EQ('2', buf[2]);
994 ASSERT_EQ('3', buf[3]);
995 ASSERT_EQ('4', buf[4]);
996 ASSERT_EQ('5', buf[5]);
997 ASSERT_EQ('6', buf[6]);
998 ASSERT_EQ('7', buf[7]);
999 ASSERT_EQ('8', buf[8]);
1000 ASSERT_EQ('\0', buf[9]);
1010 char buf[BUFSIZ];
1011 snprintf(BUF_AND_SIZE(buf), CONTENTS);
1012 EXPECT_STREQ(CONTENTS, buf);
1014 snprintf(BUF_AND_SIZE_AND_CONTENTS(buf));
1015 EXPECT_STREQ(CONTENTS, buf);
1017 sprintf(BUF_AND_CONTENTS(buf));
1018 EXPECT_STREQ(CONTENTS, buf);
1023 pollfd buf[1] = {{0, POLLIN, 0}};
1025 ASSERT_FORTIFY(poll(buf, fd_count, 0));
1030 pollfd buf[1] = {{0, POLLIN, 0}};
1034 ASSERT_FORTIFY(ppoll(buf, fd_count, &timeout, NULL));