| 94 | |
| 95 | |
| 96 | static void * uriDefaultReallocarray(UriMemoryManager * URI_UNUSED(memory), |
| 97 | void * ptr, size_t nmemb, size_t size) { |
| 98 | #ifdef HAVE_REALLOCARRAY |
| 99 | return reallocarray(ptr, nmemb, size); |
| 100 | #else |
| 101 | const size_t total_size = nmemb * size; |
| 102 | |
| 103 | URI_CHECK_ALLOC_OVERFLOW(total_size, nmemb, size); /* may return */ |
| 104 | |
| 105 | return realloc(ptr, total_size); |
| 106 | #endif |
| 107 | } |
| 108 | |
| 109 | |
| 110 |
nothing calls this directly
no test coverage detected