summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2014-02-04 18:55:14 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2014-02-04 18:55:14 +0100
commitd1435c2e91ed9146acd4b0d10e6a892dc79e67be (patch)
treeaba36427a486e8b39917af8ea3fb2555432ab3a4 /i386
parent9a54b8d78e9d63987379206a0cbc856c46a2ef44 (diff)
Fix potential NULL dereference
Found by Coverity * i386/i386/db_trace.c (db_find_kthread): Handle case when task is NULL.
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/db_trace.c2
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*/;