fix armeabi-v7a crash - SIGBUS(BUS_ADRALN)

This commit is contained in:
sonil 2022-10-23 18:46:35 +08:00
parent 21aec548af
commit eddc6557b9
1 changed files with 2 additions and 0 deletions

View File

@ -307,6 +307,8 @@ bool heapBlockAllocate(Heap* heap, int* handleIndexPtr, int size, int a4)
int blockSize;
HeapHandle* handle;
size += 4 - size % 4;
if (heap == NULL || handleIndexPtr == NULL || size == 0) {
goto err;
}