diff options
| author | Ron Dahlgren <ronald.dahlgren@gmail.com> | 2013-06-08 22:16:14 -0700 |
|---|---|---|
| committer | Ron Dahlgren <ronald.dahlgren@gmail.com> | 2013-06-09 10:43:16 -0700 |
| commit | 12203a76c22cebff394a2b157a0d1f4cec3d46f8 (patch) | |
| tree | 46c36d07b91c9014b5de091a5a4a60064e0d7b15 | |
| parent | 88c318d28c7d8fe8346d38d73cb0b1a30f33f278 (diff) | |
| download | rust-12203a76c22cebff394a2b157a0d1f4cec3d46f8.tar.gz rust-12203a76c22cebff394a2b157a0d1f4cec3d46f8.zip | |
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.
| -rw-r--r-- | src/rt/rust_task.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index b5ecb166175..c521feae72f 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -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; |
