mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Avoid calling realloc() with a zero size in fuzzcheck.c.
FossilOrigin-Name: a1fd14694c1adc54e5c443ebfdef38e38637f5c5
This commit is contained in:
@ -189,7 +189,7 @@ static int progressHandler(void *pVdbeLimitFlag){
|
||||
** Reallocate memory. Show and error and quit if unable.
|
||||
*/
|
||||
static void *safe_realloc(void *pOld, int szNew){
|
||||
void *pNew = realloc(pOld, szNew);
|
||||
void *pNew = realloc(pOld, szNew<=0 ? 1 : szNew);
|
||||
if( pNew==0 ) fatalError("unable to realloc for %d bytes", szNew);
|
||||
return pNew;
|
||||
}
|
||||
|
Reference in New Issue
Block a user