Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLHAlloc must return NULL when internal allocations fail #476

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading