/external/chromium_org/third_party/libwebp/utils/ |
utils.c | 24 // Returns 0 in case of overflow of nmemb * size. 25 static int CheckSizeArgumentsOverflow(uint64_t nmemb, size_t size) { 26 const uint64_t total_size = nmemb * size; 27 if (nmemb == 0) return 1; 28 if ((uint64_t)size > WEBP_MAX_ALLOCABLE_MEMORY / nmemb) return 0; 33 void* WebPSafeMalloc(uint64_t nmemb, size_t size) { 34 if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL; 35 assert(nmemb * size > 0); 36 return malloc((size_t)(nmemb * size)); 39 void* WebPSafeCalloc(uint64_t nmemb, size_t size) [all...] |
/external/webp/src/utils/ |
utils.c | 24 // Returns 0 in case of overflow of nmemb * size. 25 static int CheckSizeArgumentsOverflow(uint64_t nmemb, size_t size) { 26 const uint64_t total_size = nmemb * size; 27 if (nmemb == 0) return 1; 28 if ((uint64_t)size > WEBP_MAX_ALLOCABLE_MEMORY / nmemb) return 0; 33 void* WebPSafeMalloc(uint64_t nmemb, size_t size) { 34 if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL; 35 assert(nmemb * size > 0); 36 return malloc((size_t)(nmemb * size)); 39 void* WebPSafeCalloc(uint64_t nmemb, size_t size) [all...] |
/external/openssh/ |
xmalloc.c | 41 xcalloc(size_t nmemb, size_t size) 45 if (size == 0 || nmemb == 0) 47 if (SIZE_T_MAX / nmemb < size) 48 fatal("xcalloc: nmemb * size > SIZE_T_MAX"); 49 ptr = calloc(nmemb, size); 52 (u_long)(size * nmemb)); 57 xrealloc(void *ptr, size_t nmemb, size_t size) 60 size_t new_size = nmemb * size; 64 if (SIZE_T_MAX / nmemb < size) 65 fatal("xrealloc: nmemb * size > SIZE_T_MAX") [all...] |
/external/openssh/openbsd-compat/ |
bsd-poll.c | 45 size_t nmemb; local 57 nmemb = howmany(maxfd + 1 , NFDBITS); 58 if ((readfds = calloc(nmemb, sizeof(fd_mask))) == NULL || 59 (writefds = calloc(nmemb, sizeof(fd_mask))) == NULL || 60 (exceptfds = calloc(nmemb, sizeof(fd_mask))) == NULL) {
|
/packages/inputmethods/PinyinIME/jni/include/ |
mystdlib.h | 28 size_t nmemb, size_t size,
|
/ndk/sources/host-tools/sed-4.2.1/sed/ |
utils.h | 27 void ck_fwrite P_((const VOID *ptr, size_t size, size_t nmemb, FILE *stream)); 28 size_t ck_fread P_((VOID *ptr, size_t size, size_t nmemb, FILE *stream));
|
utils.c | 238 ck_fwrite(ptr, size, nmemb, stream) 241 size_t nmemb; 245 if (size && fwrite(ptr, size, nmemb, stream) != nmemb) 247 "couldn't write %d items to %s: %s", nmemb), 248 nmemb, utils_fp_name(stream), strerror(errno)); 253 ck_fread(ptr, size, nmemb, stream) 256 size_t nmemb; 260 if (size && (nmemb=fread(ptr, size, nmemb, stream)) <= 0 && ferror(stream) [all...] |
/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/ |
af_vfs.h | 49 size_t af_fread (void *data, size_t size, size_t nmemb, AFvirtualfile *vfile); 50 size_t af_fwrite (const void *data, size_t size, size_t nmemb, AFvirtualfile *vfile);
|
/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/sysroot/usr/include/ |
af_vfs.h | 49 size_t af_fread (void *data, size_t size, size_t nmemb, AFvirtualfile *vfile); 50 size_t af_fwrite (const void *data, size_t size, size_t nmemb, AFvirtualfile *vfile);
|
/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/sysroot/usr/include/ |
af_vfs.h | 49 size_t af_fread (void *data, size_t size, size_t nmemb, AFvirtualfile *vfile); 50 size_t af_fwrite (const void *data, size_t size, size_t nmemb, AFvirtualfile *vfile);
|
/bionic/libc/upstream-netbsd/libc/stdlib/ |
bsearch.c | 62 bsearch(const void *key, const void *base0, size_t nmemb, size_t size, 71 _DIAGASSERT(base0 != NULL || nmemb == 0); 74 for (lim = nmemb; lim != 0; lim >>= 1) {
|
/external/chromium_org/third_party/yasm/source/patched-yasm/libyasm/ |
mergesort.c | 102 yasm__mergesort(void *base, size_t nmemb, size_t size, 106 return mergesort(base, nmemb, size, cmp); 121 if (nmemb == 0) 132 if ((list2 = yasm_xmalloc(nmemb * size + PSIZE)) == NULL) 136 setup(list1, list2, nmemb, size, cmp); 137 last = list2 + nmemb * size; 233 last = list2 + nmemb*size; 236 memmove(list2, list1, nmemb*size);
|
/external/compiler-rt/lib/asan/ |
asan_malloc_linux.cc | 28 DECLARE_REAL_AND_INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) 78 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { 84 uptr size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize; 91 return asan_calloc(nmemb, size, &stack);
|
asan_malloc_win.cc | 57 void *calloc(size_t nmemb, size_t size) { 59 return asan_calloc(nmemb, size, &stack); 66 void *_calloc_impl(size_t nmemb, size_t size, int *errno_tmp) { 67 return calloc(nmemb, size);
|
asan_malloc_mac.cc | 124 INTERCEPTOR(void *, calloc, size_t nmemb, size_t size) { 127 return asan_calloc(nmemb, size, &stack); 170 void *mz_calloc(malloc_zone_t *zone, size_t nmemb, size_t size) { 176 size_t size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize; 183 return asan_calloc(nmemb, size, &stack);
|
/external/qemu/distrib/sdl-1.2.15/src/stdlib/ |
SDL_qsort.c | 242 last=first + (nmemb>limit ? limit : nmemb-1)*sz;\ 250 last=((char*)base)+nmemb*size; \ 320 static void qsort_nonaligned(void *base, size_t nmemb, size_t size, 330 first=(char*)base; last=first+(nmemb-1)*size; 351 static void qsort_aligned(void *base, size_t nmemb, size_t size, 361 first=(char*)base; last=first+(nmemb-1)*size; 382 static void qsort_words(void *base, size_t nmemb, 391 first=(char*)base; last=first+(nmemb-1)*WORD_BYTES; 417 last=((char*)base)+nmemb*WORD_BYTES [all...] |
/external/aac/libSYS/src/ |
genericStds.cpp | 392 UINT FDKfwrite(void *ptrf, INT size, UINT nmemb, FDKFILE *fp) { return fwrite(ptrf, size, nmemb, (FILE*)fp); } 395 UINT FDKfread(void *dst, INT size, UINT nmemb, FDKFILE *fp) { return fread(dst, size, nmemb, (FILE*)fp); } 405 UINT FDKfwrite_EL(void *ptrf, INT size, UINT nmemb, FDKFILE *fp) { 408 FDKfwrite(ptrf, size, nmemb, fp); 415 for (n=0; n<nmemb; n++) { 423 return nmemb; 427 UINT FDKfread_EL(void *dst, INT size, UINT nmemb, FDKFILE *fp) { 436 for (n=0; n<nmemb; n++) [all...] |
/external/flac/include/FLAC/ |
callback.h | 96 * \param nmemb The number of records to be read. 101 typedef size_t (*FLAC__IOCallback_Read) (void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle); 109 * \param nmemb The number of records to be written. 114 typedef size_t (*FLAC__IOCallback_Write) (const void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle);
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/include/ |
cstdlib | 48 void* calloc(size_t nmemb, size_t size); 58 void* bsearch(const void* key, const void* base, size_t nmemb, size_t size, 60 void qsort(void* base, size_t nmemb, size_t size,
|
/external/chromium/chrome/browser/safe_browsing/ |
safe_browsing_store_file.cc | 52 // Read an array of |nmemb| items from |fp| into |ptr|, and fold the 56 bool ReadArray(T* ptr, size_t nmemb, FILE* fp, MD5Context* context) { 57 const size_t ret = fread(ptr, sizeof(T), nmemb, fp); 58 if (ret != nmemb) 62 MD5Update(context, ptr, sizeof(T) * nmemb); 66 // Write an array of |nmemb| items from |ptr| to |fp|, and fold the 70 bool WriteArray(const T* ptr, size_t nmemb, FILE* fp, MD5Context* context) { 71 const size_t ret = fwrite(ptr, sizeof(T), nmemb, fp); 72 if (ret != nmemb) 76 MD5Update(context, ptr, sizeof(T) * nmemb); [all...] |
/external/chromium_org/third_party/mesa/src/src/mesa/main/ |
imports.c | 471 _mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, 477 while (nmemb) { 478 nmemb >>= 1; 479 mid = (char *)base + nmemb * size; 485 --nmemb; 490 return bsearch(key, base, nmemb, size, compar);
|
/external/mesa3d/src/mesa/main/ |
imports.c | 471 _mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, 477 while (nmemb) { 478 nmemb >>= 1; 479 mid = (char *)base + nmemb * size; 485 --nmemb; 490 return bsearch(key, base, nmemb, size, compar);
|
/external/compiler-rt/lib/lsan/ |
lsan_interceptors.cc | 71 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { 72 if (CallocShouldReturnNullDueToOverflow(size, nmemb)) return 0; 75 size *= nmemb;
|
/external/clang/test/Analysis/ |
malloc-sizeof.c | 6 void *calloc(size_t nmemb, size_t size);
|
malloc.cpp | 7 void *calloc(size_t nmemb, size_t size);
|