Skip to content

Commit 12203a7

Browse files
author
Ron Dahlgren
committed
Check stk before dereferencing
This commit fixes #7022 - I've added an additional check to ensure that stk is not null before dereferencing it to get it's next element, assigning NULL if it is itself NULL.
1 parent 88c318d commit 12203a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rt/rust_task.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ rust_task::new_big_stack() {
612612
}
613613

614614
big_stack->task = this;
615-
big_stack->next = stk->next;
615+
big_stack->next = stk ? stk->next : NULL;
616616
if (big_stack->next)
617617
big_stack->next->prev = big_stack;
618618
big_stack->prev = stk;

0 commit comments

Comments
 (0)