/external/libxml2/ |
D | buf.c | 60 #define UPDATE_COMPAT(buf) \ argument 61 if (buf->size < INT_MAX) buf->compat_size = buf->size; \ 62 else buf->compat_size = INT_MAX; \ 63 if (buf->use < INT_MAX) buf->compat_use = buf->use; \ 64 else buf->compat_use = INT_MAX; 71 #define CHECK_COMPAT(buf) \ argument 72 if (buf->size != (size_t) buf->compat_size) \ 73 if (buf->compat_size < INT_MAX) \ 74 buf->size = buf->compat_size; \ 75 if (buf->use != (size_t) buf->compat_use) \ [all …]
|
/external/flatbuffers/go/ |
D | encode.go | 22 func GetByte(buf []byte) byte { 23 return byte(GetUint8(buf)) 27 func GetBool(buf []byte) bool { 28 return buf[0] == 1 32 func GetUint8(buf []byte) (n uint8) { 33 n = uint8(buf[0]) 38 func GetUint16(buf []byte) (n uint16) { 39 _ = buf[1] // Force one bounds check. See: golang.org/issue/14808 40 n |= uint16(buf[0]) 41 n |= uint16(buf[1]) << 8 [all …]
|
/external/llvm-project/compiler-rt/test/msan/Linux/ |
D | syscalls.cpp | 23 char buf[1000] __attribute__((aligned(8))); in main() local 26 memset(buf, 0, sizeof(buf)); in main() 27 __msan_unpoison(buf, sizeof(buf)); in main() 28 __sanitizer_syscall_pre_recvmsg(0, buf, 0); in main() 29 __sanitizer_syscall_pre_rt_sigpending(buf, kTen); in main() 30 __sanitizer_syscall_pre_getdents(0, buf, kTen); in main() 31 __sanitizer_syscall_pre_getdents64(0, buf, kTen); in main() 33 __msan_unpoison(buf, sizeof(buf)); in main() 34 __sanitizer_syscall_post_recvmsg(0, 0, buf, 0); in main() 35 __sanitizer_syscall_post_rt_sigpending(-1, buf, kTen); in main() [all …]
|
/external/compiler-rt/test/msan/Linux/ |
D | syscalls.cc | 22 char buf[1000] __attribute__((aligned(8))); in main() local 25 memset(buf, 0, sizeof(buf)); in main() 26 __msan_unpoison(buf, sizeof(buf)); in main() 27 __sanitizer_syscall_pre_recvmsg(0, buf, 0); in main() 28 __sanitizer_syscall_pre_rt_sigpending(buf, kTen); in main() 29 __sanitizer_syscall_pre_getdents(0, buf, kTen); in main() 30 __sanitizer_syscall_pre_getdents64(0, buf, kTen); in main() 32 __msan_unpoison(buf, sizeof(buf)); in main() 33 __sanitizer_syscall_post_recvmsg(0, 0, buf, 0); in main() 34 __sanitizer_syscall_post_rt_sigpending(-1, buf, kTen); in main() [all …]
|
/external/libchrome/base/strings/ |
D | safe_sprintf_unittest.cc | 31 char buf[2] = { 'X', 'X' }; in TEST() local 34 EXPECT_EQ(-1, SafeSNPrintf(buf, static_cast<size_t>(-1), "")); in TEST() 35 EXPECT_EQ('X', buf[0]); in TEST() 36 EXPECT_EQ('X', buf[1]); in TEST() 39 EXPECT_EQ(-1, SafeSNPrintf(buf, 0, "")); in TEST() 40 EXPECT_EQ('X', buf[0]); in TEST() 41 EXPECT_EQ('X', buf[1]); in TEST() 44 EXPECT_EQ(0, SafeSNPrintf(buf, 1, "")); in TEST() 45 EXPECT_EQ(0, buf[0]); in TEST() 46 EXPECT_EQ('X', buf[1]); in TEST() [all …]
|
/external/openssh/ |
D | sshbuf.c | 32 sshbuf_check_sanity(const struct sshbuf *buf) in sshbuf_check_sanity() argument 35 if (__predict_false(buf == NULL || in sshbuf_check_sanity() 36 (!buf->readonly && buf->d != buf->cd) || in sshbuf_check_sanity() 37 buf->refcount < 1 || buf->refcount > SSHBUF_REFS_MAX || in sshbuf_check_sanity() 38 buf->cd == NULL || in sshbuf_check_sanity() 39 buf->max_size > SSHBUF_SIZE_MAX || in sshbuf_check_sanity() 40 buf->alloc > buf->max_size || in sshbuf_check_sanity() 41 buf->size > buf->alloc || in sshbuf_check_sanity() 42 buf->off > buf->size)) { in sshbuf_check_sanity() 53 sshbuf_maybe_pack(struct sshbuf *buf, int force) in sshbuf_maybe_pack() argument [all …]
|
/external/llvm-project/clang/test/Sema/ |
D | warn-fortify-source.c | 39 char buf[20]; in call_memcpy_type() local 40 …memcpy(&p.first, buf, 20); // expected-warning {{memcpy' will always overflow; destination buffer … in call_memcpy_type() 68 char buf[10]; in call_memset() local 69 __builtin_memset(buf, 0xff, 10); in call_memset() 70 …__builtin_memset(buf, 0xff, 11); // expected-warning {{'memset' will always overflow; destination … in call_memset() 74 char buf[10]; in call_snprintf() local 75 __builtin_snprintf(buf, 10, "merp"); in call_snprintf() 76 …__builtin_snprintf(buf, 11, "merp"); // expected-warning {{'snprintf' size argument is too large; … in call_snprintf() 80 char buf[10]; in call_vsnprintf() local 82 __builtin_vsnprintf(buf, 10, "merp", list); in call_vsnprintf() [all …]
|
/external/adhd/cras/src/common/ |
D | byte_buffer.h | 25 struct byte_buffer *buf; in byte_buffer_create() local 26 buf = (struct byte_buffer *)calloc(1, sizeof(struct byte_buffer) + in byte_buffer_create() 28 if (!buf) in byte_buffer_create() 29 return buf; in byte_buffer_create() 30 buf->max_size = buffer_size_bytes; in byte_buffer_create() 31 buf->used_size = buffer_size_bytes; in byte_buffer_create() 32 return buf; in byte_buffer_create() 35 static inline void byte_buffer_set_used_size(struct byte_buffer *buf, in byte_buffer_set_used_size() argument 38 buf->used_size = MIN(used_size, buf->max_size); in byte_buffer_set_used_size() 42 static inline void byte_buffer_destroy(struct byte_buffer **buf) in byte_buffer_destroy() argument [all …]
|
/external/mesa3d/src/util/ |
D | u_dynarray.h | 54 util_dynarray_init(struct util_dynarray *buf, void *mem_ctx) in util_dynarray_init() argument 56 memset(buf, 0, sizeof(*buf)); in util_dynarray_init() 57 buf->mem_ctx = mem_ctx; in util_dynarray_init() 61 util_dynarray_fini(struct util_dynarray *buf) in util_dynarray_fini() argument 63 if (buf->data) { in util_dynarray_fini() 64 if (buf->mem_ctx) { in util_dynarray_fini() 65 ralloc_free(buf->data); in util_dynarray_fini() 67 free(buf->data); in util_dynarray_fini() 69 util_dynarray_init(buf, buf->mem_ctx); in util_dynarray_fini() 74 util_dynarray_clear(struct util_dynarray *buf) in util_dynarray_clear() argument [all …]
|
/external/webrtc/rtc_base/ |
D | byte_order_unittest.cc | 21 uint8_t buf[8] = {0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u}; in TEST() local 22 Set8(buf, 0, 0xfb); in TEST() 23 Set8(buf, 1, 0x12); in TEST() 24 EXPECT_EQ(0xfb, buf[0]); in TEST() 25 EXPECT_EQ(0x12, buf[1]); in TEST() 26 SetBE16(buf, 0x1234); in TEST() 27 EXPECT_EQ(0x12, buf[0]); in TEST() 28 EXPECT_EQ(0x34, buf[1]); in TEST() 29 SetLE16(buf, 0x1234); in TEST() 30 EXPECT_EQ(0x34, buf[0]); in TEST() [all …]
|
D | buffer_unittest.cc | 53 Buffer buf(kTestData, 7); in TEST() local 54 EXPECT_EQ(buf.size(), 7u); in TEST() 55 EXPECT_EQ(buf.capacity(), 7u); in TEST() 56 EXPECT_FALSE(buf.empty()); in TEST() 57 EXPECT_EQ(0, memcmp(buf.data(), kTestData, 7)); in TEST() 61 Buffer buf(kTestData, 7, 14); in TEST() local 62 EXPECT_EQ(buf.size(), 7u); in TEST() 63 EXPECT_EQ(buf.capacity(), 14u); in TEST() 64 EXPECT_FALSE(buf.empty()); in TEST() 65 EXPECT_EQ(0, memcmp(buf.data(), kTestData, 7)); in TEST() [all …]
|
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/dexbacked/ |
D | BaseDexReader.java | 55 byte[] buf = dexBuf.buf; in readSleb128() 57 result = buf[end++] & 0xff; in readSleb128() 61 currentByteValue = buf[end++] & 0xff; in readSleb128() 66 currentByteValue = buf[end++] & 0xff; in readSleb128() 71 currentByteValue = buf[end++] & 0xff; in readSleb128() 76 currentByteValue = buf[end++] & 0xff; in readSleb128() 95 byte[] buf = dexBuf.buf; in peekSleb128Size() 97 result = buf[end++] & 0xff; in peekSleb128Size() 99 currentByteValue = buf[end++] & 0xff; in peekSleb128Size() 101 currentByteValue = buf[end++] & 0xff; in peekSleb128Size() [all …]
|
D | BaseDexBuffer.java | 39 @Nonnull /* package private */ final byte[] buf; field in BaseDexBuffer 42 public BaseDexBuffer(@Nonnull byte[] buf) { in BaseDexBuffer() argument 43 this(buf, 0); in BaseDexBuffer() 45 public BaseDexBuffer(@Nonnull byte[] buf, int offset) { in BaseDexBuffer() argument 46 this.buf = buf; in BaseDexBuffer() 51 byte[] buf = this.buf; in readSmallUint() 53 int result = (buf[offset] & 0xff) | in readSmallUint() 54 ((buf[offset+1] & 0xff) << 8) | in readSmallUint() 55 ((buf[offset+2] & 0xff) << 16) | in readSmallUint() 56 ((buf[offset+3]) << 24); in readSmallUint() [all …]
|
/external/wpa_supplicant_8/src/p2p/ |
D | p2p_build.c | 18 void p2p_buf_add_action_hdr(struct wpabuf *buf, u8 subtype, u8 dialog_token) in p2p_buf_add_action_hdr() argument 20 wpabuf_put_u8(buf, WLAN_ACTION_VENDOR_SPECIFIC); in p2p_buf_add_action_hdr() 21 wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); in p2p_buf_add_action_hdr() 23 wpabuf_put_u8(buf, subtype); /* OUI Subtype */ in p2p_buf_add_action_hdr() 24 wpabuf_put_u8(buf, dialog_token); in p2p_buf_add_action_hdr() 29 void p2p_buf_add_public_action_hdr(struct wpabuf *buf, u8 subtype, in p2p_buf_add_public_action_hdr() argument 32 wpabuf_put_u8(buf, WLAN_ACTION_PUBLIC); in p2p_buf_add_public_action_hdr() 33 wpabuf_put_u8(buf, WLAN_PA_VENDOR_SPECIFIC); in p2p_buf_add_public_action_hdr() 34 wpabuf_put_be32(buf, P2P_IE_VENDOR_TYPE); in p2p_buf_add_public_action_hdr() 36 wpabuf_put_u8(buf, subtype); /* OUI Subtype */ in p2p_buf_add_public_action_hdr() [all …]
|
/external/python/cpython3/Modules/_blake2/impl/ |
D | blake2s-load-sse2.h | 17 #define LOAD_MSG_0_1(buf) buf = _mm_set_epi32(m6,m4,m2,m0) argument 18 #define LOAD_MSG_0_2(buf) buf = _mm_set_epi32(m7,m5,m3,m1) argument 19 #define LOAD_MSG_0_3(buf) buf = _mm_set_epi32(m14,m12,m10,m8) argument 20 #define LOAD_MSG_0_4(buf) buf = _mm_set_epi32(m15,m13,m11,m9) argument 21 #define LOAD_MSG_1_1(buf) buf = _mm_set_epi32(m13,m9,m4,m14) argument 22 #define LOAD_MSG_1_2(buf) buf = _mm_set_epi32(m6,m15,m8,m10) argument 23 #define LOAD_MSG_1_3(buf) buf = _mm_set_epi32(m5,m11,m0,m1) argument 24 #define LOAD_MSG_1_4(buf) buf = _mm_set_epi32(m3,m7,m2,m12) argument 25 #define LOAD_MSG_2_1(buf) buf = _mm_set_epi32(m15,m5,m12,m11) argument 26 #define LOAD_MSG_2_2(buf) buf = _mm_set_epi32(m13,m2,m0,m8) argument [all …]
|
/external/wpa_supplicant_8/src/utils/ |
D | wpabuf.c | 22 static struct wpabuf_trace * wpabuf_get_trace(const struct wpabuf *buf) in wpabuf_get_trace() argument 25 ((const u8 *) buf - sizeof(struct wpabuf_trace)); in wpabuf_get_trace() 30 static void wpabuf_overflow(const struct wpabuf *buf, size_t len) in wpabuf_overflow() argument 33 struct wpabuf_trace *trace = wpabuf_get_trace(buf); in wpabuf_overflow() 40 buf, (unsigned long) buf->size, (unsigned long) buf->used, in wpabuf_overflow() 49 struct wpabuf *buf = *_buf; in wpabuf_resize() local 54 if (buf == NULL) { in wpabuf_resize() 60 trace = wpabuf_get_trace(buf); in wpabuf_resize() 69 if (buf->used + add_len > buf->size) { in wpabuf_resize() 71 if (buf->flags & WPABUF_FLAG_EXT_DATA) { in wpabuf_resize() [all …]
|
/external/fastrpc/inc/ |
D | sbuf.h | 69 uintptr_t buf; //! start of valid memory member 82 static __inline void sbuf_init(struct sbuf* buf, int offset, void* data, int dataLen) { in sbuf_init() argument 83 buf->buf = (uintptr_t)data; in sbuf_init() 84 buf->bufStart = buf->bufCur = (uintptr_t)data - offset; in sbuf_init() 85 buf->bufEnd = (uintptr_t)data + dataLen; in sbuf_init() 89 static __inline void sbuf_advance(struct sbuf* buf, int len) { in sbuf_advance() argument 90 buf->bufCur += len; in sbuf_advance() 97 static __inline int sbuf_needed(struct sbuf* buf) { in sbuf_needed() argument 98 return buf->bufCur - buf->bufStart; in sbuf_needed() 104 static __inline int sbuf_left(struct sbuf* buf) { in sbuf_left() argument [all …]
|
/external/llvm-project/compiler-rt/lib/sanitizer_common/tests/ |
D | sanitizer_printf_test.cpp | 22 char buf[1024]; in TEST() local 24 buf, sizeof(buf), "a%db%zdc%ue%zuf%xh%zxq%pe%sr", (int)-1, (uptr)-2, in TEST() 26 EXPECT_EQ(len, strlen(buf)); in TEST() 31 EXPECT_STREQ(expectedString.c_str(), buf); in TEST() 35 char buf[] = "123456789"; in TEST() local 36 uptr len = internal_snprintf(buf, 4, "%s", "abcdef"); // NOLINT in TEST() 38 EXPECT_STREQ("abc", buf); in TEST() 39 EXPECT_EQ(buf[3], 0); in TEST() 40 EXPECT_EQ(buf[4], '5'); in TEST() 41 EXPECT_EQ(buf[5], '6'); in TEST() [all …]
|
/external/rust/crates/byteorder/src/ |
D | io.rs | 56 let mut buf = [0; 1]; in read_u8() localVariable 57 self.read_exact(&mut buf)?; in read_u8() 58 Ok(buf[0]) in read_u8() 86 let mut buf = [0; 1]; in read_i8() localVariable 87 self.read_exact(&mut buf)?; in read_i8() 88 Ok(buf[0] as i8) in read_i8() 113 let mut buf = [0; 2]; in read_u16() localVariable 114 self.read_exact(&mut buf)?; in read_u16() 115 Ok(T::read_u16(&buf)) in read_u16() 140 let mut buf = [0; 2]; in read_i16() localVariable [all …]
|
/external/rust/crates/grpcio-compiler/src/ |
D | prost_codegen.rs | 53 let mut buf = Vec::new(); in compile_protos() localVariable 54 fs::File::open(descriptor_set)?.read_to_end(&mut buf)?; in compile_protos() 55 let descriptor_set = FileDescriptorSet::decode(buf.as_slice())?; in compile_protos() 77 fn generate(&mut self, service: Service, buf: &mut String) { in generate() 78 generate_methods(&service, buf); in generate() 79 generate_client(&service, buf); in generate() 80 generate_server(&service, buf); in generate() 84 fn generate_methods(service: &Service, buf: &mut String) { in generate_methods() 92 generate_method(&service.name, &service_path, method, buf); in generate_methods() 104 fn generate_method(service_name: &str, service_path: &str, method: &Method, buf: &mut String) { in generate_method() [all …]
|
/external/libwebsockets/lib/core-net/ |
D | server.c | 52 lws_json_dump_vhost(const struct lws_vhost *vh, char *buf, int len) in lws_json_dump_vhost() argument 65 char *orig = buf, *end = buf + len - 1, first; in lws_json_dump_vhost() 71 buf += lws_snprintf(buf, end - buf, in lws_json_dump_vhost() 108 buf += lws_snprintf(buf, end - buf, ",\n \"mounts\":["); in lws_json_dump_vhost() 112 buf += lws_snprintf(buf, end - buf, ","); in lws_json_dump_vhost() 113 buf += lws_snprintf(buf, end - buf, in lws_json_dump_vhost() 129 buf += lws_snprintf(buf, end - buf, in lws_json_dump_vhost() 132 buf += lws_snprintf(buf, end - buf, "\n }"); in lws_json_dump_vhost() 136 buf += lws_snprintf(buf, end - buf, "\n ]"); in lws_json_dump_vhost() 143 buf += lws_snprintf(buf, end - buf, ",\n \"ws-protocols\":["); in lws_json_dump_vhost() [all …]
|
/external/compiler-rt/lib/sanitizer_common/tests/ |
D | sanitizer_printf_test.cc | 23 char buf[1024]; in TEST() local 24 uptr len = internal_snprintf(buf, sizeof(buf), in TEST() 30 EXPECT_EQ(len, strlen(buf)); in TEST() 35 EXPECT_STREQ(expectedString.c_str(), buf); in TEST() 39 char buf[] = "123456789"; in TEST() local 40 uptr len = internal_snprintf(buf, 4, "%s", "abcdef"); // NOLINT in TEST() 42 EXPECT_STREQ("abc", buf); in TEST() 43 EXPECT_EQ(buf[3], 0); in TEST() 44 EXPECT_EQ(buf[4], '5'); in TEST() 45 EXPECT_EQ(buf[5], '6'); in TEST() [all …]
|
/external/llvm-project/llvm/unittests/ADT/ |
D | SmallPtrSetTest.cpp | 21 int buf[8]; in TEST() local 23 buf[i] = 0; in TEST() 25 SmallPtrSet<int *, 4> s1 = {&buf[0], &buf[1]}; in TEST() 27 (s2 = s1).insert(&buf[2]); in TEST() 30 (s2 = static_cast<SmallPtrSet<int *, 4> &>(s2)).insert(&buf[3]); in TEST() 36 EXPECT_TRUE(s1.count(&buf[i])); in TEST() 38 EXPECT_FALSE(s1.count(&buf[i])); in TEST() 42 (s2 = {&buf[6], &buf[7], &buf[6]}).insert({&buf[5], &buf[4]}); in TEST() 45 EXPECT_FALSE(s2.count(&buf[i])); in TEST() 47 EXPECT_TRUE(s2.count(&buf[i])); in TEST() [all …]
|
/external/gemmlowp/internal/ |
D | simd_wrappers_neon.h | 162 result.buf.reg[i] = vld1q_s16(src + 8 * i); 173 result.buf.reg[i] = vld1_u8(src + 8 * i); 184 result.buf.reg[i] = vld1_s8(src + 8 * i); 195 result.buf.reg[i] = vld1q_s32(src + 4 * i); 207 result.buf.reg[0] = ShiftLeft(lhs.buf.reg[0], Dup<Int32x4>(rhs.buf.reg[0])); 218 result.buf.reg[0] = ShiftLeft(lhs.buf.reg[0], Dup<Int32x4>(rhs.buf.reg[0])); 229 result.buf.reg[0] = ShiftLeft(lhs.buf.reg[0], rhs.buf.reg[0]); 240 result.buf.reg[0] = ShiftLeft(lhs.buf.reg[0], rhs.buf.reg[0]); 251 result.buf.reg[0] = ShiftLeft(lhs.buf.reg[0], DupLane<0>(rhs.buf.reg[0])); 252 result.buf.reg[1] = ShiftLeft(lhs.buf.reg[1], DupLane<1>(rhs.buf.reg[0])); [all …]
|
D | simd_wrappers_common_neon_sse.h | 32 result.buf.reg[i] = LoadInt32x4(src.data(row, col + i)); 46 result.buf.reg[2 * i + 0] = LoadInt32x4(src.data(row + 0, col + i)); 47 result.buf.reg[2 * i + 1] = LoadInt32x4(src.data(row + 4, col + i)); 60 std::int32_t buf[4]; 62 buf[i] = src(row, col + i); 64 result.buf.reg[0] = LoadInt32x4(buf); 76 std::int32_t buf[8]; 78 buf[i] = src(row, col + i); 80 result.buf.reg[0] = LoadInt32x4(buf); 81 result.buf.reg[1] = LoadInt32x4(buf + 4); [all …]
|