1
0
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:
drh
2016-03-23 17:54:19 +00:00
parent 231ee68808
commit c5412d533c
3 changed files with 9 additions and 9 deletions

View File

@ -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;
}