diff options
author | Martin Kraemer <martin@apache.org> | 2008-02-01 08:56:55 +0000 |
---|---|---|
committer | Martin Kraemer <martin@apache.org> | 2008-02-01 08:56:55 +0000 |
commit | 1b26e52e7476533d7dc0f81bd3f4e281a60ed810 (patch) | |
tree | 18677211c5c8b9dbe3511c2568015dd2f48d8609 /threadproc | |
parent | ed8ddd3adc5ca40ece7fd39360970eed12cd4c32 (diff) | |
download | apr-1b26e52e7476533d7dc0f81bd3f4e281a60ed810.tar.gz |
Check for bogus (negative) signal numbers
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@617375 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-rw-r--r-- | threadproc/unix/signals.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/threadproc/unix/signals.c b/threadproc/unix/signals.c index 46acc1d1f..57a31af97 100644 --- a/threadproc/unix/signals.c +++ b/threadproc/unix/signals.c @@ -116,7 +116,7 @@ void apr_signal_init(apr_pool_t *pglobal) } const char *apr_signal_description_get(int signum) { - return sys_siglist[signum]; + return (signum >= 0) ? sys_siglist[signum] : "unknown signal (number)"; } #else /* !(SYS_SIGLIST_DECLARED || HAVE_DECL_SYS_SIGLIST) */ @@ -262,7 +262,7 @@ void apr_signal_init(apr_pool_t *pglobal) const char *apr_signal_description_get(int signum) { return - signum < APR_NUMSIG + (signum >= 0 && signum < APR_NUMSIG) ? signal_description[signum] : "unknown signal (number)"; } |