diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-02-04 18:55:14 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-02-04 18:55:14 +0100 |
commit | d1435c2e91ed9146acd4b0d10e6a892dc79e67be (patch) | |
tree | aba36427a486e8b39917af8ea3fb2555432ab3a4 | |
parent | 9a54b8d78e9d63987379206a0cbc856c46a2ef44 (diff) |
Fix potential NULL dereference
Found by Coverity
* i386/i386/db_trace.c (db_find_kthread): Handle case when task is NULL.
-rw-r--r-- | i386/i386/db_trace.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/i386/i386/db_trace.c b/i386/i386/db_trace.c index 0f0bbdc..cdebde1 100644 --- a/i386/i386/db_trace.c +++ b/i386/i386/db_trace.c @@ -533,6 +533,8 @@ db_find_kthread( task_t task) { thread_t thread; + if (task == TASK_NULL) + task = db_current_task(); queue_iterate(&task->thread_list, thread, thread_t, thread_list) { vm_offset_t usp = thread->pcb->iss.uesp/*ebp works*/; |