/bionic/tests/ |
H A D | async_safe_test.cpp | 25 char buf[BUFSIZ]; local 27 async_safe_format_buffer(buf, sizeof(buf), "a"); 28 EXPECT_STREQ("a", buf); 30 async_safe_format_buffer(buf, sizeof(buf), "%%"); 31 EXPECT_STREQ("%", buf); 33 async_safe_format_buffer(buf, sizeof(buf), "01234"); 34 EXPECT_STREQ("01234", buf); 113 char buf[BUFSIZ]; local 123 char buf[BUFSIZ]; local 133 char buf[BUFSIZ]; local 147 char buf[BUFSIZ]; local 161 char buf[BUFSIZ]; local 171 char buf[BUFSIZ]; local 181 char buf[BUFSIZ]; local [all...] |
H A D | stack_protector_test_helper.cpp | 19 char buf[128]; local 23 volatile char* p = buf; 24 int size = static_cast<int>(sizeof(buf) + 1); 25 while ((p - buf) < size) *p++ = '\0';
|
H A D | resolv_test.cpp | 42 uint8_t buf[128]; local 43 ASSERT_EQ(128, b64_pton(data, buf, sizeof(buf))); 47 char buf[128]; local 48 memset(buf, 'x', sizeof(buf)); 51 buf, sizeof(buf))); 52 ASSERT_STREQ(buf, "aGVsbG8="); 56 u_char buf[12 local [all...] |
H A D | string_posix_strerror_r_test.cpp | 41 char buf[256]; local 44 ASSERT_EQ(0, strerror_r(0, buf, sizeof(buf))); 45 ASSERT_STREQ("Success", buf); 46 ASSERT_EQ(0, strerror_r(1, buf, sizeof(buf))); 47 ASSERT_STREQ("Operation not permitted", buf); 50 ASSERT_EQ(0, strerror_r(-1, buf, sizeof(buf))); 51 ASSERT_STREQ("Unknown error -1", buf); [all...] |
H A D | fortify_filecheck_diagnostics_test.cpp | 48 char buf[4]; local 53 sprintf(buf, "foobar"); // NOLINT(runtime/printf) 58 sprintf(buf, "%s", "foobar"); // NOLINT(runtime/printf) 62 char buf[4]; local 67 snprintf(buf, 5, "foobar"); // NOLINT(runtime/printf) 72 snprintf(buf, 5, "%s", "foobar"); // NOLINT(runtime/printf) 77 snprintf(buf, 5, " %s ", "foobar"); // NOLINT(runtime/printf) 82 snprintf(buf, 5, "%d", 100000); // NOLINT(runtime/printf) 86 char buf[4]; local 91 memcpy(buf, "fooba 95 char buf[4]; local 104 char buf[4]; local 113 char buf[4]; local 127 char buf[4]; local 141 char buf[4]; local 150 char buf[4] = ""; local 159 char buf[4] = ""; local 170 char buf[4]; local 182 char buf[4]; local 194 char buf[4]; local 208 char buf[4]; local 218 char buf[4] = {0}; local 234 char buf[4]; local 285 char buf[4]; local 293 char buf[4]; local 302 char buf[4] = {0}; local 310 char buf[4] = {0}; local 319 char buf[4]; local 327 char buf[4] = {0}; local 335 void *buf = calloc(atoi("5"), 1); local 343 char buf[4] = {0}; local 351 char buf[4] = {0}; local 366 char buf[4] = {0}; local 376 char buf[4] = {0}; local 385 char buf[4] = {0}; local [all...] |
H A D | libgen_test.cpp | 44 char* buf, size_t buf_size, int expected_errno) { 46 int rc = basename_r(in, buf, buf_size); 48 if (rc != -1 && buf != NULL) { 49 ASSERT_STREQ(expected_out, buf) << in; 55 char* buf, size_t buf_size, int expected_errno) { 57 int rc = dirname_r(in, buf, buf_size); 59 if (rc != -1 && buf != NULL) { 60 ASSERT_STREQ(expected_out, buf) << in; 68 char buf[256]; local 70 TestBasename("", ".", -1, buf, 43 TestBasename(const char* in, const char* expected_out, int expected_rc, char* buf, size_t buf_size, int expected_errno) argument 54 TestDirname(const char* in, const char* expected_out, int expected_rc, char* buf, size_t buf_size, int expected_errno) argument 87 char buf[256]; local [all...] |
H A D | fortify_test.cpp | 313 char buf[10]; local 315 ASSERT_FORTIFY(strcpy(buf, orig)); 325 char buf[0]; local 327 ASSERT_FORTIFY(strcpy(buf, orig)); 337 char buf[0]; local 339 ASSERT_FORTIFY(strcpy(buf, orig)); 349 char buf[1]; local 351 ASSERT_FORTIFY(strcpy(buf, orig)); 360 char buf[10]; local 361 memcpy(buf, "012345678 370 char buf[10]; local 380 char buf[10]; local 414 char buf[10]; local 426 char* buf = (char *) malloc(10); local 435 char buf[5]; local 440 char buf[10]; local 459 char buf[10]; local 479 char buf[10]; local 486 char buf[10]; local 495 char buf[10]; local 501 char buf[20]; local 516 char buf[10]; local 561 char buf[10]; local 574 char buf[10]; local 580 char buf[10] = {0}; local 593 char buf[1]; local 599 char buf[1]; local 605 char buf[1]; local 613 char buf[1]; local 621 char buf[1] = {0}; local 629 char buf[1] = {0}; local 637 char buf[1]; local 645 char buf[1] = {0}; local 653 char buf[1]; local 661 char buf[1] = {0}; local 669 char buf[1]; local 675 char buf[1]; local 684 char buf[10]; local 703 char buf[10]; local 722 char buf[10]; local 740 char buf[10]; local 758 char buf[10]; local 777 char buf[10]; local 797 char buf[10]; local 816 char buf[10]; local 913 char buf[10]; local 934 char buf[10]; local 943 char buf[10]; local 952 char buf[10]; local 974 char buf[BUFSIZ]; local 987 pollfd buf[1] = {{0, POLLIN, 0}}; local 994 pollfd buf[1] = {{0, POLLIN, 0}}; local [all...] |
H A D | sys_xattr_test.cpp | 26 char buf[10]; local 28 ASSERT_EQ(4, getxattr(tf.filename, "user.foo", buf, sizeof(buf))); 29 ASSERT_STREQ("bar", buf); 30 buf[0] = '\0'; 31 ASSERT_EQ(4, lgetxattr(tf.filename, "user.foo", buf, sizeof(buf))); 32 ASSERT_STREQ("bar", buf); 37 char buf[10]; local 39 ASSERT_EQ(4, fgetxattr(tf.fd, "user.foo", buf, sizeo 45 char buf[10]; local 52 char buf[10]; local 59 char buf[10]; local 75 char buf[10]; local 93 char buf[10]; local 106 char buf[65536]; // 64kB is max possible xattr list size. See "man 7 xattr". local 115 char buf[65536]; // 64kB is max possible xattr list size. See "man 7 xattr". local [all...] |
H A D | stdio_test.cpp | 287 char buf[32]; local 288 snprintf(buf, sizeof(buf), "%zd", v); 293 char buf[BUFSIZ]; local 294 EXPECT_EQ(23, snprintf(buf, sizeof(buf), "<%a>", 9990.235)); 295 EXPECT_STREQ("<0x1.3831e147ae148p+13>", buf); 299 char buf[BUFSIZ]; local 301 EXPECT_EQ(3, snprintf(buf, sizeof(buf), "< 306 char buf[BUFSIZ]; local 313 char buf[BUFSIZ]; local 325 char buf[BUFSIZ]; local 339 char buf[32]; local 350 char buf[BUFSIZ]; local 452 T buf[BUFSIZ]; local 580 wchar_t buf[nchars]; local 600 wchar_t buf[nchars]; local 608 wchar_t buf[nchars]; local 617 wchar_t buf[nchars]; local 626 wchar_t buf[nchars]; local 634 wchar_t buf[nchars]; local 642 wchar_t buf[nchars]; local 650 wchar_t buf[nchars]; local 658 wchar_t buf[nchars]; local 662 ASSERT_EQ(std::wstring(kWideString), buf); local 664 ASSERT_EQ(std::wstring(kWideString), buf); local 669 wchar_t buf[nchars]; local 673 ASSERT_EQ(std::wstring(kWideString), buf); local 675 ASSERT_EQ(std::wstring(kWideString), buf); local 679 char buf[BUFSIZ]; local 685 char buf[BUFSIZ]; local 691 char buf[BUFSIZ]; local 697 char buf[BUFSIZ]; local 703 char buf[BUFSIZ]; local 709 char buf[BUFSIZ]; local 715 char buf[BUFSIZ]; local 725 char buf[BUFSIZ]; local 735 char buf[BUFSIZ]; local 741 char buf[BUFSIZ]; local 747 char buf[BUFSIZ]; local 753 char buf[BUFSIZ]; local 759 char buf[BUFSIZ]; local 765 char buf[BUFSIZ]; local 771 char buf[BUFSIZ]; local 781 char buf[BUFSIZ]; local 806 char buf[BUFSIZ]; local 827 char buf[PATH_MAX]; local 845 char buf[128]; local 897 char buf[16]; local 966 char buf[256] = {}; local 1171 char buf[4] = "x"; local 1405 char buf[16]; local 1430 char buf[8]; local 1463 char buf[16]; local 1573 char buf[8]; local 1593 char buf[8]; local 1611 char buf[8]; local 1626 char buf[] = "h\\0e\\0l\\0l\\0o"; local 1651 char buf[8]; local 1717 char buf[] = "hello\\0world"; local 1756 char buf[16]; local 1801 char buf[] = "hello\\0world"; local 1898 char buf[65*1024]; local 2036 char buf[6] = {0}; local 2262 char buf[L_ctermid] = {}; local 2290 char buf[16]; local 2302 std::string buf = "world"; local 2309 std::string buf = "world"; local 2414 char buf[BUFSIZ] = {}; local [all...] |
/bionic/libc/private/ |
H A D | FdPath.h | 22 snprintf(buf, sizeof(buf), "/proc/self/fd/%d", fd); 26 return buf; 30 char buf[40]; member in class:FdPath
|
H A D | bionic_arc4random.h | 41 void __libc_safe_arc4random_buf(void* buf, size_t n, KernelArgumentBlock& args);
|
/bionic/libc/upstream-openbsd/lib/libc/stdio/ |
H A D | gets.c | 41 gets(char *buf) argument 47 for (s = buf; (c = getchar_unlocked()) != '\n';) 49 if (s == buf) { 58 return (buf);
|
H A D | vdprintf.c | 44 __dwrite(void *cookie, const char *buf, int n) argument 47 return (write(*fdp, buf, n)); 55 unsigned char buf[BUFSIZ]; local 60 f._p = buf; 61 f._w = sizeof(buf); 64 f._bf._base = buf; 65 f._bf._size = sizeof(buf);
|
/bionic/libc/bionic/ |
H A D | getcwd.cpp | 34 extern "C" int __getcwd(char* buf, size_t size); 36 char* getcwd(char* buf, size_t size) { argument 38 if (buf != NULL && size == 0) { 46 if (buf == NULL) { 52 buf = allocated_buf = static_cast<char*>(malloc(allocated_size)); 53 if (buf == NULL) { 61 int rc = __getcwd(buf, allocated_size); 71 buf = strdup(allocated_buf); 74 buf = allocated_buf; 78 return buf; [all...] |
H A D | ether_ntoa.c | 38 ether_ntoa_r (const struct ether_addr *addr, char * buf) argument 40 snprintf(buf, 18, "%02x:%02x:%02x:%02x:%02x:%02x", 44 return buf; 53 static char buf[18]; local 54 return ether_ntoa_r(addr, buf);
|
H A D | recv.cpp | 31 ssize_t recv(int socket, void *buf, size_t len, int flags) { argument 32 return recvfrom(socket, buf, len, flags, NULL, 0);
|
H A D | send.cpp | 31 ssize_t send(int socket, const void* buf, size_t len, int flags) { argument 32 return sendto(socket, buf, len, flags, NULL, 0);
|
H A D | bionic_arc4random.cpp | 40 void __libc_safe_arc4random_buf(void* buf, size_t n, KernelArgumentBlock& args) { argument 46 arc4random_buf(buf, n); 56 memcpy(buf, reinterpret_cast<char*>(args.getauxval(AT_RANDOM)) + at_random_bytes_consumed, n);
|
H A D | mntent.cpp | 39 mntent* getmntent_r(FILE* fp, struct mntent* e, char* buf, int buf_len) { argument 41 while (fgets(buf, buf_len, fp) != NULL) { 45 if (sscanf(buf, " %n%*s%n %n%*s%n %n%*s%n %n%*s%n %d %d", 48 e->mnt_fsname = &buf[fsname0]; 49 buf[fsname1] = '\0'; 51 e->mnt_dir = &buf[dir0]; 52 buf[dir1] = '\0'; 54 e->mnt_type = &buf[type0]; 55 buf[type1] = '\0'; 57 e->mnt_opts = &buf[opts [all...] |
/bionic/libc/include/bits/fortify/ |
H A D | socket.h | 45 ssize_t recvfrom(int fd, void* const buf __pass_object_size0, size_t len, int flags, struct sockaddr* src_addr, socklen_t* addr_len) 47 __clang_error_if(__bos(buf) != __BIONIC_FORTIFY_UNKNOWN_SIZE && __bos(buf) < len, 49 size_t bos = __bos0(buf); 52 return __call_bypassing_fortify(recvfrom)(fd, buf, len, flags, src_addr, addr_len); 54 return __recvfrom_chk(fd, buf, len, bos, flags, src_addr, addr_len); 60 ssize_t sendto(int fd, const void* const buf __pass_object_size0, size_t len, int flags, const struct sockaddr* dest_addr, socklen_t addr_len) 62 __clang_error_if(__bos0(buf) != __BIONIC_FORTIFY_UNKNOWN_SIZE && __bos0(buf) < len, 64 size_t bos = __bos0(buf); [all...] |
H A D | unistd.h | 72 char* getcwd(char* const __pass_object_size buf, size_t size) 74 __error_if_overflows_objectsize(size, __bos(buf), getcwd) { 75 size_t bos = __bos(buf); 78 return __call_bypassing_fortify(getcwd)(buf, size); 81 return __getcwd_chk(buf, size, bos); 87 ssize_t pread(int fd, void* const __pass_object_size0 buf, size_t count, off_t offset) 90 __error_if_overflows_objectsize(count, __bos0(buf), pread) { 91 size_t bos = __bos0(buf); 94 return __PREAD_PREFIX(real)(fd, buf, count, offset); 97 return __PREAD_PREFIX(chk)(fd, buf, coun 259 pread(int fd, void* buf, size_t count, off_t offset) argument 282 pread64(int fd, void* buf, size_t count, off64_t offset) argument 307 pwrite(int fd, const void* buf, size_t count, off_t offset) argument 330 pwrite64(int fd, const void* buf, size_t count, off64_t offset) argument 355 read(int fd, void* buf, size_t count) argument 380 write(int fd, const void* buf, size_t count) argument 401 readlink(const char* path, char* buf, size_t size) argument 424 readlinkat(int dirfd, const char* path, char* buf, size_t size) argument [all...] |
/bionic/tools/versioner/current/bits/fortify/ |
H A D | socket.h | 45 ssize_t recvfrom(int fd, void* const buf __pass_object_size0, size_t len, int flags, struct sockaddr* src_addr, socklen_t* addr_len) 47 __clang_error_if(__bos(buf) != __BIONIC_FORTIFY_UNKNOWN_SIZE && __bos(buf) < len, 49 size_t bos = __bos0(buf); 52 return __call_bypassing_fortify(recvfrom)(fd, buf, len, flags, src_addr, addr_len); 54 return __recvfrom_chk(fd, buf, len, bos, flags, src_addr, addr_len); 60 ssize_t sendto(int fd, const void* const buf __pass_object_size0, size_t len, int flags, const struct sockaddr* dest_addr, socklen_t addr_len) 62 __clang_error_if(__bos0(buf) != __BIONIC_FORTIFY_UNKNOWN_SIZE && __bos0(buf) < len, 64 size_t bos = __bos0(buf); [all...] |
H A D | unistd.h | 72 char* getcwd(char* const __pass_object_size buf, size_t size) 74 __error_if_overflows_objectsize(size, __bos(buf), getcwd) { 75 size_t bos = __bos(buf); 78 return __call_bypassing_fortify(getcwd)(buf, size); 81 return __getcwd_chk(buf, size, bos); 87 ssize_t pread(int fd, void* const __pass_object_size0 buf, size_t count, off_t offset) 90 __error_if_overflows_objectsize(count, __bos0(buf), pread) { 91 size_t bos = __bos0(buf); 94 return __PREAD_PREFIX(real)(fd, buf, count, offset); 97 return __PREAD_PREFIX(chk)(fd, buf, coun 259 pread(int fd, void* buf, size_t count, off_t offset) argument 282 pread64(int fd, void* buf, size_t count, off64_t offset) argument 307 pwrite(int fd, const void* buf, size_t count, off_t offset) argument 330 pwrite64(int fd, const void* buf, size_t count, off64_t offset) argument 355 read(int fd, void* buf, size_t count) argument 380 write(int fd, const void* buf, size_t count) argument 401 readlink(const char* path, char* buf, size_t size) argument 424 readlinkat(int dirfd, const char* path, char* buf, size_t size) argument [all...] |
/bionic/libc/upstream-openbsd/lib/libc/locale/ |
H A D | wctob.c | 37 char buf[MB_LEN_MAX]; local 40 if (c == WEOF || wcrtomb(buf, c, &mbs) != 1) 42 return ((unsigned char)*buf);
|
/bionic/libc/dns/nameser/ |
H A D | ns_print.c | 59 char **buf, size_t *buflen); 62 char **buf, size_t *buflen); 63 static void addlen(size_t len, char **buf, size_t *buflen); 65 char **buf, size_t *buflen); 67 char **buf, size_t *buflen); 85 * Number of characters written to buf, or -1 (check errno). 90 char *buf, size_t buflen) 97 name_ctx, origin, buf, buflen); 105 * Number of characters written to buf, or -1 (check errno). 112 char *buf, size_ 88 ns_sprintrr(const ns_msg *handle, const ns_rr *rr, const char *name_ctx, const char *origin, char *buf, size_t buflen) argument 108 ns_sprintrrf(const u_char *msg, size_t msglen, const char *name, ns_class class, ns_type type, u_long ttl, const u_char *rdata, size_t rdlen, const char *name_ctx, const char *origin, char *buf, size_t buflen) argument 164 addlen(strlen(buf), &buf, &buflen); local 334 addlen(strlen(buf), &buf, &buflen); local 425 addlen(strlen(buf), &buf, &buflen); local 669 addlen(strlen(buf), &buf, &buflen); local 692 addlen(strlen(buf), &buf, &buflen); local 964 addlen(strlen(buf), &buf, &buflen); local 969 addlen(strlen(buf), &buf, &buflen); local 1142 charstr(const u_char *rdata, const u_char *edata, char **buf, size_t *buflen) argument 1177 addname(const u_char *msg, size_t msglen, const u_char **pp, const char *origin, char **buf, size_t *buflen) argument 1222 addlen(size_t len, char **buf, size_t *buflen) argument 1229 addstr(const char *src, size_t len, char **buf, size_t *buflen) argument 1241 addtab(size_t len, size_t target, int spaced, char **buf, size_t *buflen) argument [all...] |