Check that the signal number is in range.

Submitted by:	maxim
MFC after:	1 week
Approved by:	pjd (mentor)
This commit is contained in:
kib 2006-07-12 12:41:56 +00:00
parent 697e7523e2
commit d6a4e16f1b

View File

@ -946,7 +946,10 @@ const char *signames[] = {
void
ktrpsig(struct ktr_psig *psig)
{
(void)printf("SIG%s ", signames[psig->signo]);
if (psig->signo > 0 && psig->signo < NSIG)
(void)printf("SIG%s", signames[psig->signo]);
else
(void)printf("SIG%s ", psig->signo);
if (psig->action == SIG_DFL)
(void)printf("SIG_DFL\n");
else {