/external/opencv3/3rdparty/libwebp/utils/ |
D | utils.c | 25 static int CheckSizeArgumentsOverflow(uint64_t nmemb, size_t size) { in CheckSizeArgumentsOverflow() argument 26 const uint64_t total_size = nmemb * size; in CheckSizeArgumentsOverflow() 27 if (nmemb == 0) return 1; in CheckSizeArgumentsOverflow() 28 if ((uint64_t)size > WEBP_MAX_ALLOCABLE_MEMORY / nmemb) return 0; in CheckSizeArgumentsOverflow() 33 void* WebPSafeMalloc(uint64_t nmemb, size_t size) { in WebPSafeMalloc() argument 34 if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL; in WebPSafeMalloc() 35 assert(nmemb * size > 0); in WebPSafeMalloc() 36 return malloc((size_t)(nmemb * size)); in WebPSafeMalloc() 39 void* WebPSafeCalloc(uint64_t nmemb, size_t size) { in WebPSafeCalloc() argument 40 if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL; in WebPSafeCalloc() [all …]
|
/external/opencv3/3rdparty/libjasper/ |
D | jas_malloc.c | 124 void *jas_realloc2(void *ptr, size_t nmemb, size_t size) in jas_realloc2() argument 127 return jas_alloc2(nmemb, size); in jas_realloc2() 128 if (nmemb && SIZE_MAX / nmemb < size) { in jas_realloc2() 132 return jas_realloc(ptr, nmemb * size); in jas_realloc2() 136 void *jas_alloc2(size_t nmemb, size_t size) in jas_alloc2() argument 138 if (nmemb && SIZE_MAX / nmemb < size) { in jas_alloc2() 143 return jas_malloc(nmemb * size); in jas_alloc2() 158 void *jas_calloc(size_t nmemb, size_t size) in jas_calloc() argument 162 ptr = jas_alloc2(nmemb, size); in jas_calloc() 164 memset(ptr, 0, nmemb*size); in jas_calloc()
|
/external/webp/src/utils/ |
D | utils.c | 166 static int CheckSizeArgumentsOverflow(uint64_t nmemb, size_t size) { in CheckSizeArgumentsOverflow() argument 167 const uint64_t total_size = nmemb * size; in CheckSizeArgumentsOverflow() 168 if (nmemb == 0) return 1; in CheckSizeArgumentsOverflow() 169 if ((uint64_t)size > WEBP_MAX_ALLOCABLE_MEMORY / nmemb) return 0; in CheckSizeArgumentsOverflow() 185 void* WebPSafeMalloc(uint64_t nmemb, size_t size) { in WebPSafeMalloc() argument 188 if (!CheckSizeArgumentsOverflow(nmemb, size)) return NULL; in WebPSafeMalloc() 189 assert(nmemb * size > 0); in WebPSafeMalloc() 190 ptr = malloc((size_t)(nmemb * size)); in WebPSafeMalloc() 191 AddMem(ptr, (size_t)(nmemb * size)); in WebPSafeMalloc() 195 void* WebPSafeCalloc(uint64_t nmemb, size_t size) { in WebPSafeCalloc() argument [all …]
|
/external/curl/tests/libtest/ |
D | lib1509.c | 28 size_t WriteOutput(void *ptr, size_t size, size_t nmemb, void *stream); 29 size_t WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream); 83 size_t WriteOutput(void *ptr, size_t size, size_t nmemb, void *stream) in WriteOutput() argument 85 fwrite(ptr, size, nmemb, stream); in WriteOutput() 86 return nmemb * size; in WriteOutput() 89 size_t WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream) in WriteHeader() argument 94 realHeaderSize += curlx_uztoul(size * nmemb); in WriteHeader() 96 return nmemb * size; in WriteHeader()
|
D | libntlmconnect.c | 40 static size_t callback(char* ptr, size_t size, size_t nmemb, void* data) in callback() argument 47 const size_t failure = (size * nmemb) ? 0 : 1; in callback() 49 char *output = malloc(size * nmemb + 1); in callback() 56 memcpy(output, ptr, size * nmemb); in callback() 57 output[size * nmemb] = '\0'; in callback() 90 return size * nmemb; in callback()
|
D | lib552.c | 126 static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream) in read_callback() argument 128 size_t amount = nmemb * size; /* Total bytes curl wants */ in read_callback() 138 static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *stream) in write_callback() argument 140 int amount = curlx_uztosi(size * nmemb); in write_callback() 143 return size * nmemb; in write_callback()
|
/external/strace/ |
D | xmalloc.c | 51 void *xcalloc(size_t nmemb, size_t size) in xcalloc() argument 53 void *p = calloc(nmemb, size); in xcalloc() 63 void *xreallocarray(void *ptr, size_t nmemb, size_t size) in xreallocarray() argument 65 size_t bytes = nmemb * size; in xreallocarray() 67 if ((nmemb | size) >= HALF_SIZE_T && in xreallocarray() 68 size && bytes / size != nmemb) in xreallocarray()
|
/external/opencv3/3rdparty/include/ffmpeg_/libavutil/ |
D | mem.h | 94 av_alloc_size(1, 2) static inline void *av_malloc_array(size_t nmemb, size_t size) in av_malloc_array() argument 96 if (size <= 0 || nmemb >= INT_MAX / size) in av_malloc_array() 98 return av_malloc(nmemb * size); in av_malloc_array() 136 av_alloc_size(2, 3) void *av_realloc_array(void *ptr, size_t nmemb, size_t size); 149 av_alloc_size(2, 3) int av_reallocp_array(void *ptr, size_t nmemb, size_t size); 181 void *av_calloc(size_t nmemb, size_t size) av_malloc_attrib; 193 av_alloc_size(1, 2) static inline void *av_mallocz_array(size_t nmemb, size_t size) in av_mallocz_array() argument 195 if (size <= 0 || nmemb >= INT_MAX / size) in av_mallocz_array() 197 return av_mallocz(nmemb * size); in av_mallocz_array()
|
/external/aac/libSYS/src/ |
D | genericStds.cpp | 397 UINT FDKfwrite(void *ptrf, INT size, UINT nmemb, FDKFILE *fp) { return fwrite(ptrf, size, nmemb, (F… in FDKfwrite() argument 400 UINT FDKfread(void *dst, INT size, UINT nmemb, FDKFILE *fp) { return fread(dst, size, nmemb, (FILE*… in FDKfread() argument 410 UINT FDKfwrite_EL(void *ptrf, INT size, UINT nmemb, FDKFILE *fp) { in FDKfwrite_EL() argument 413 FDKfwrite(ptrf, size, nmemb, fp); in FDKfwrite_EL() 420 for (n=0; n<nmemb; n++) { in FDKfwrite_EL() 428 return nmemb; in FDKfwrite_EL() 432 UINT FDKfread_EL(void *dst, INT size, UINT nmemb, FDKFILE *fp) { in FDKfread_EL() argument 441 for (n=0; n<nmemb; n++) { in FDKfread_EL() 455 err = nmemb; in FDKfread_EL() 458 if ((err = FDKfread(dst, size, nmemb, fp)) != nmemb) { in FDKfread_EL() [all …]
|
/external/curl/docs/examples/ |
D | ftpuploadresume.c | 48 size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream) in getcontentlengthfunc() argument 54 r = _snscanf(ptr, size * nmemb, "Content-Length: %ld\n", &len); in getcontentlengthfunc() 59 return size * nmemb; in getcontentlengthfunc() 63 size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream) in discardfunc() argument 65 return size * nmemb; in discardfunc() 69 size_t readfunc(void *ptr, size_t size, size_t nmemb, void *stream) in readfunc() argument 77 n = fread(ptr, size, nmemb, f) * size; in readfunc()
|
D | ftp-wildcard.c | 35 static size_t write_it(char *buff, size_t size, size_t nmemb, 137 static size_t write_it(char *buff, size_t size, size_t nmemb, in write_it() argument 143 written = fwrite(buff, size, nmemb, data->output); in write_it() 146 written = fwrite(buff, size, nmemb, stdout); in write_it()
|
D | curlgtk.c | 19 size_t my_write_func(void *ptr, size_t size, size_t nmemb, FILE *stream) in my_write_func() argument 21 return fwrite(ptr, size, nmemb, stream); in my_write_func() 24 size_t my_read_func(void *ptr, size_t size, size_t nmemb, FILE *stream) in my_read_func() argument 26 return fread(ptr, size, nmemb, stream); in my_read_func()
|
/external/curl/src/ |
D | tool_cb_wrt.c | 75 size_t tool_write_cb(void *buffer, size_t sz, size_t nmemb, void *userdata) in tool_write_cb() argument 87 const size_t failure = (sz * nmemb) ? 0 : 1; in tool_write_cb() 94 if(sz * nmemb > (size_t)CURL_MAX_HTTP_HEADER) { in tool_write_cb() 101 if(sz * nmemb > (size_t)CURL_MAX_WRITE_SIZE) { in tool_write_cb() 140 rc = fwrite(buffer, sz, nmemb, outs->stream); in tool_write_cb() 142 if((sz * nmemb) == rc) in tool_write_cb() 144 outs->bytes += (sz * nmemb); in tool_write_cb()
|
D | tool_cb_hdr.c | 42 size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata) in tool_header_cb() argument 48 const size_t cb = size * nmemb; in tool_header_cb() 57 size_t failure = (size * nmemb) ? 0 : 1; in tool_header_cb() 63 if(size * nmemb > (size_t)CURL_MAX_HTTP_HEADER) { in tool_header_cb() 75 size_t rc = fwrite(ptr, size, nmemb, heads->stream); in tool_header_cb()
|
/external/valgrind/memcheck/tests/ |
D | undef_malloc_args.c | 28 size_t nmemb = 1; in main() local 29 (void) VALGRIND_MAKE_MEM_UNDEFINED(&nmemb, 1); in main() 30 new_p = calloc(nmemb, def_size); in main() 42 size_t nmemb = 16; in main() 45 new_p = memalign(nmemb, size); in main()
|
/external/libmicrohttpd/src/testcurl/ |
D | test_timeout.c | 87 putBuffer (void *stream, size_t size, size_t nmemb, void *ptr) in putBuffer() argument 92 wrt = size * nmemb; in putBuffer() 102 putBuffer_fail (void *stream, size_t size, size_t nmemb, void *ptr) in putBuffer_fail() argument 109 copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) in copyBuffer() argument 113 if (cbc->pos + size * nmemb > cbc->size) in copyBuffer() 115 memcpy (&cbc->buf[cbc->pos], ptr, size * nmemb); in copyBuffer() 116 cbc->pos += size * nmemb; in copyBuffer() 117 return size * nmemb; in copyBuffer()
|
D | test_urlparse.c | 59 copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) in copyBuffer() argument 63 if (cbc->pos + size * nmemb > cbc->size) in copyBuffer() 65 memcpy (&cbc->buf[cbc->pos], ptr, size * nmemb); in copyBuffer() 66 cbc->pos += size * nmemb; in copyBuffer() 67 return size * nmemb; in copyBuffer()
|
D | test_digestauth_with_arguments.c | 58 copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) in copyBuffer() argument 62 if (cbc->pos + size * nmemb > cbc->size) in copyBuffer() 64 memcpy (&cbc->buf[cbc->pos], ptr, size * nmemb); in copyBuffer() 65 cbc->pos += size * nmemb; in copyBuffer() 66 return size * nmemb; in copyBuffer()
|
D | test_digestauth.c | 59 copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) in copyBuffer() argument 63 if (cbc->pos + size * nmemb > cbc->size) in copyBuffer() 65 memcpy (&cbc->buf[cbc->pos], ptr, size * nmemb); in copyBuffer() 66 cbc->pos += size * nmemb; in copyBuffer() 67 return size * nmemb; in copyBuffer()
|
/external/compiler-rt/lib/asan/ |
D | asan_malloc_win.cc | 68 void *calloc(size_t nmemb, size_t size) { in calloc() argument 70 return asan_calloc(nmemb, size, &stack); in calloc() 74 void *_calloc_dbg(size_t nmemb, size_t size, int, const char *, int) { in _calloc_dbg() argument 75 return calloc(nmemb, size); in _calloc_dbg() 79 void *_calloc_impl(size_t nmemb, size_t size, int *errno_tmp) { in _calloc_impl() argument 80 return calloc(nmemb, size); in _calloc_impl()
|
/external/wpa_supplicant_8/src/utils/ |
D | os.h | 277 static inline void * os_calloc(size_t nmemb, size_t size) in os_calloc() argument 279 if (size && nmemb > (~(size_t) 0) / size) in os_calloc() 281 return os_zalloc(nmemb * size); in os_calloc() 565 static inline void * os_realloc_array(void *ptr, size_t nmemb, size_t size) in os_realloc_array() argument 567 if (size && nmemb > (~(size_t) 0) / size) in os_realloc_array() 569 return os_realloc(ptr, nmemb * size); in os_realloc_array() 579 static inline void os_remove_in_array(void *ptr, size_t nmemb, size_t size, in os_remove_in_array() argument 582 if (idx < nmemb - 1) in os_remove_in_array() 585 (nmemb - idx - 1) * size); in os_remove_in_array()
|
/external/opencv3/3rdparty/libtiff/ |
D | tif_aux.c | 64 tmsize_t nmemb, tmsize_t elem_size, const char* what) in _TIFFCheckRealloc() argument 67 tmsize_t bytes = nmemb * elem_size; in _TIFFCheckRealloc() 72 if (nmemb && elem_size && bytes / elem_size == nmemb) in _TIFFCheckRealloc() 79 what,(long) nmemb, (long) elem_size); in _TIFFCheckRealloc() 86 _TIFFCheckMalloc(TIFF* tif, tmsize_t nmemb, tmsize_t elem_size, const char* what) in _TIFFCheckMalloc() argument 88 return _TIFFCheckRealloc(tif, NULL, nmemb, elem_size, what); in _TIFFCheckMalloc()
|
/external/libmicrohttpd/src/testzzuf/ |
D | test_put_chunked.c | 50 putBuffer (void *stream, size_t size, size_t nmemb, void *ptr) in putBuffer() argument 55 wrt = size * nmemb; in putBuffer() 66 copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) in copyBuffer() argument 70 if (cbc->pos + size * nmemb > cbc->size) in copyBuffer() 72 memcpy (&cbc->buf[cbc->pos], ptr, size * nmemb); in copyBuffer() 73 cbc->pos += size * nmemb; in copyBuffer() 74 return size * nmemb; in copyBuffer()
|
/external/pdfium/third_party/libtiff/ |
D | tif_aux.c | 64 tmsize_t nmemb, tmsize_t elem_size, const char* what) in _TIFFCheckRealloc() argument 67 tmsize_t bytes = nmemb * elem_size; in _TIFFCheckRealloc() 72 if (nmemb && elem_size && bytes / elem_size == nmemb) in _TIFFCheckRealloc() 79 what,(long) nmemb, (long) elem_size); in _TIFFCheckRealloc() 86 _TIFFCheckMalloc(TIFF* tif, tmsize_t nmemb, tmsize_t elem_size, const char* what) in _TIFFCheckMalloc() argument 88 return _TIFFCheckRealloc(tif, NULL, nmemb, elem_size, what); in _TIFFCheckMalloc()
|
/external/libweave/examples/provider/ |
D | curl_http_client.cc | 32 size_t WriteFunction(void* contents, size_t size, size_t nmemb, void* userp) { in WriteFunction() argument 34 size * nmemb); in WriteFunction() 35 return size * nmemb; in WriteFunction() 38 size_t HeaderFunction(void* contents, size_t size, size_t nmemb, void* userp) { in HeaderFunction() argument 39 std::string header(static_cast<const char*>(contents), size * nmemb); in HeaderFunction() 56 return size * nmemb; in HeaderFunction()
|