Skip to content

Commit c0fd00c

Browse files
penneryusaghul
authored andcommitted
Fix crash on failure to read bytecode (arguments, local variables, etc.)
1 parent eb996c5 commit c0fd00c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

quickjs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34079,7 +34079,8 @@ static void free_function_bytecode(JSRuntime *rt, JSFunctionBytecode *b)
3407934079
{
3408034080
int i;
3408134081

34082-
free_bytecode_atoms(rt, b->byte_code_buf, b->byte_code_len, true);
34082+
if (b->byte_code_buf)
34083+
free_bytecode_atoms(rt, b->byte_code_buf, b->byte_code_len, true);
3408334084

3408434085
if (b->vardefs) {
3408534086
for(i = 0; i < b->arg_count + b->var_count; i++) {

0 commit comments

Comments
 (0)