mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
zlib can use m_malloc/m_free too
--HG-- branch : fuzz
This commit is contained in:
@@ -77,7 +77,9 @@ void * m_malloc(size_t size) {
|
||||
}
|
||||
|
||||
void * m_calloc(size_t nmemb, size_t size) {
|
||||
assert(nmemb <= 1000 && size <= 10000);
|
||||
if (SIZE_T_MAX / nmemb < size) {
|
||||
dropbear_exit("m_calloc failed");
|
||||
}
|
||||
return m_malloc(nmemb*size);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user