mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2026-05-06 19:10:30 +00:00
* zic.c (growalloc): Fix typos in size calculation and diagnostic.
This commit is contained in:
4
zic.c
4
zic.c
@@ -400,8 +400,8 @@ growalloc(void *ptr, size_t itemsize, int nitems, int *nitems_alloc)
|
||||
return ptr;
|
||||
else {
|
||||
int amax = INT_MAX < SIZE_MAX ? INT_MAX : SIZE_MAX;
|
||||
if ((amax - 1) / 2 < *nitems_alloc)
|
||||
memory_exhausted("int ooverflow");
|
||||
if ((amax - 1) / 3 * 2 < *nitems_alloc)
|
||||
memory_exhausted("int overflow");
|
||||
*nitems_alloc = *nitems_alloc + (*nitems_alloc >> 1) + 1;
|
||||
return erealloc(ptr, size_product(*nitems_alloc, itemsize));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user