From eddc6557b98e494e69e76bb60e40379b88983801 Mon Sep 17 00:00:00 2001 From: sonil Date: Sun, 23 Oct 2022 18:46:35 +0800 Subject: [PATCH] fix armeabi-v7a crash - SIGBUS(BUS_ADRALN) --- src/heap.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/heap.cc b/src/heap.cc index 51236c2..e4a61f6 100644 --- a/src/heap.cc +++ b/src/heap.cc @@ -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; }