diff --git a/kernel/base/ipc/los_signal.c b/kernel/base/ipc/los_signal.c index f6ce9fd3..8edd8db4 100644 --- a/kernel/base/ipc/los_signal.c +++ b/kernel/base/ipc/los_signal.c @@ -270,8 +270,12 @@ int OsSigProcessSend(LosProcessCB *spcb, siginfo_t *sigInfo) .receivedTcb = NULL }; + if (info.sigInfo == NULL){ + return -EFAULT; + } + /* visit all taskcb and dispatch signal */ - if ((info.sigInfo != NULL) && (info.sigInfo->si_signo == SIGKILL)) { + if (info.sigInfo->si_signo == SIGKILL) { (void)OsSigProcessForeachChild(spcb, SigProcessKillSigHandler, &info); OsSigAddSet(&spcb->sigShare, info.sigInfo->si_signo); OsWaitSignalToWakeProcess(spcb);