Skip to content

Commit f647128

Browse files
committed
fix: check for null chunk ptr
1 parent c821f88 commit f647128

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

echion/stack_chunk.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ void* StackChunk::resolve(void* address)
9292
{
9393
_PyStackChunk* chunk = (_PyStackChunk*)data.get();
9494

95+
if (chunk == nullptr)
96+
{
97+
return address;
98+
}
99+
95100
// Check if this chunk contains the address
96101
if (address >= origin && address < (char*)origin + chunk->size)
97102
return (char*)chunk + ((char*)address - (char*)origin);

0 commit comments

Comments
 (0)