From d1435c2e91ed9146acd4b0d10e6a892dc79e67be Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 4 Feb 2014 18:55:14 +0100 Subject: Fix potential NULL dereference Found by Coverity * i386/i386/db_trace.c (db_find_kthread): Handle case when task is NULL. --- i386/i386/db_trace.c | 2 ++ 1 file changed, 2 insertions(+) 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*/; -- cgit v1.2.3