Skip to content

Commit

Permalink
Merge pull request #476 from zowe/bugfix/slh-null-check
Browse files Browse the repository at this point in the history
SLHAlloc must return NULL when internal allocations fail
  • Loading branch information
JoeNemo authored Aug 22, 2024
2 parents 6d46ea2 + 8698212 commit 59be7a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions c/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 59be7a4

Please sign in to comment.