From 2f538e79fea70d24e6f993a2d9626a32c171c99a Mon Sep 17 00:00:00 2001 From: solar-mist Date: Mon, 22 Aug 2022 18:48:08 +0000 Subject: [PATCH] Fix heap use after free in compiler.c --- source/compiler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/compiler.c b/source/compiler.c index d9f94fe..63d2022 100644 --- a/source/compiler.c +++ b/source/compiler.c @@ -754,7 +754,7 @@ unsigned char* collateCompiler(Compiler* compiler, int* size) { emitByte(&collation, &capacity, &count, OP_EOF); //terminate bytecode //finalize - SHRINK_ARRAY(unsigned char, collation, capacity, count); + collation = SHRINK_ARRAY(unsigned char, collation, capacity, count); *size = count;