diff --git a/CHANGELOG.md b/CHANGELOG.md index ed13c6370..18c77e22d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## `2.18.1` - Bugfix: IARV64 results must be checked for 0x7FFFF000 (#474) +- Bugfix: SLH should not ABEND when MEMLIMIT is reached (additional NULL check) ## `2.18.0` - Minor `components.zss.logLevels._zss.httpserver=5` debug messages enhancement (#471) diff --git a/c/utils.c b/c/utils.c index a1feb7c6e..b48b1268f 100644 --- a/c/utils.c +++ b/c/utils.c @@ -1502,6 +1502,7 @@ char *SLHAlloc(ShortLivedHeap *slh, int size){ safeMalloc31(size+4,"SLH Oversize Extend")); if (bigBlock == NULL){ reportSLHFailure(slh,size); + return NULL; } int *sizePtr = (int*)bigBlock; *sizePtr = size; @@ -1528,6 +1529,7 @@ char *SLHAlloc(ShortLivedHeap *slh, int size){ safeMalloc31(slh->blockSize+4,"SLH Extend") ); if (data == NULL){ reportSLHFailure(slh,size); + return NULL; } int *sizePtr = (int*)data; *sizePtr = slh->blockSize;