diff options
author | kib <kib@FreeBSD.org> | 2006-07-12 12:41:56 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2006-07-12 12:41:56 +0000 |
commit | d6a4e16f1b1231060f60717ebecd3a51dca9e535 (patch) | |
tree | db97c427f3b0bcddae3362f08dbaf7ff8b19af0b /usr.bin/kdump | |
parent | 697e7523e285c7de97bc900b1f0eeb51e3b8e5f4 (diff) | |
download | FreeBSD-src-d6a4e16f1b1231060f60717ebecd3a51dca9e535.zip FreeBSD-src-d6a4e16f1b1231060f60717ebecd3a51dca9e535.tar.gz |
Check that the signal number is in range.
Submitted by: maxim
MFC after: 1 week
Approved by: pjd (mentor)
Diffstat (limited to 'usr.bin/kdump')
-rw-r--r-- | usr.bin/kdump/kdump.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index e55e190..fa2bcc6 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -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 { |