mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 04:34:35 +03:00
XUtils: check for multiplication overflow in allocation size
This commit is contained in:

committed by
cgzones

parent
a150a81669
commit
8c8149d146
4
XUtils.h
4
XUtils.h
@ -23,10 +23,14 @@ void fail(void) ATTR_NORETURN;
|
||||
|
||||
void* xMalloc(size_t size);
|
||||
|
||||
void* xMallocArray(size_t nmemb, size_t size);
|
||||
|
||||
void* xCalloc(size_t nmemb, size_t size);
|
||||
|
||||
void* xRealloc(void* ptr, size_t size);
|
||||
|
||||
void* xReallocArray(void* ptr, size_t nmemb, size_t size);
|
||||
|
||||
/*
|
||||
* String_startsWith gives better performance if strlen(match) can be computed
|
||||
* at compile time (e.g. when they are immutable string literals). :)
|
||||
|
Reference in New Issue
Block a user