Skip to content

Commit

Permalink
Check stk before dereferencing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ron Dahlgren committed Jun 9, 2013
1 parent 88c318d commit 12203a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rt/rust_task.cpp
Expand Up @@ -612,7 +612,7 @@ rust_task::new_big_stack() {
}

big_stack->task = this;
big_stack->next = stk->next;
big_stack->next = stk ? stk->next : NULL;
if (big_stack->next)
big_stack->next->prev = big_stack;
big_stack->prev = stk;
Expand Down

0 comments on commit 12203a7

Please sign in to comment.