diff options
author | Sunmin Lee <sunm.lee@samsung.com> | 2016-12-28 10:20:32 +0900 |
---|---|---|
committer | Sunmin Lee <sunm.lee@samsung.com> | 2016-12-28 10:20:32 +0900 |
commit | b3c3dbff0e023132684879ad1d2c7f5727b29475 (patch) | |
tree | aa9614a562ff478f1df0bc03a8d064898d4b7854 /src/crash-stack | |
parent | 8e3dae0b649c19e51d76e2af6cea8ebcb6eb4a78 (diff) | |
download | crash-worker-b3c3dbff0e023132684879ad1d2c7f5727b29475.tar.gz crash-worker-b3c3dbff0e023132684879ad1d2c7f5727b29475.tar.bz2 crash-worker-b3c3dbff0e023132684879ad1d2c7f5727b29475.zip |
Fix vulnerabilitysubmit/tizen_3.0/20161228.020839
Check range of signo before use it
Change-Id: Icae63a7185a897ba6688b45715b208c2d92df1b7
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
Diffstat (limited to 'src/crash-stack')
-rw-r--r-- | src/crash-stack/crash-stack.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/crash-stack/crash-stack.c b/src/crash-stack/crash-stack.c index 250e780..7471e86 100644 --- a/src/crash-stack/crash-stack.c +++ b/src/crash-stack/crash-stack.c @@ -454,9 +454,14 @@ static void __crash_stack_print_signal(int signo) [SIGTTIN]="SIGTTIN", [SIGTTOU]="SIGTTOU", [SIGURG]="SIGURG", [SIGXCPU]="SIGXCPU", [SIGXFSZ]="SIGXFSZ", [SIGVTALRM]="SIGVTALRM", [SIGPROF]="SIGPROF", [SIGWINCH]="SIGWINCH", [SIGIO]="SIGIO", - [SIGPWR]="SIGPWR", [SIGSYS]="SIGSYS", [SIGUNUSED]="SIGUNUSED", + [SIGPWR]="SIGPWR", [SIGSYS]="SIGSYS", /* [SIGUNUSED]="SIGUNUSED", */ }; + if (SIGHUP > signo || signo > SIGSYS) { + fprintf(errfile, "Invalid signal number: %d\n", signo); + return; + } + printf("Signal: %d\n" "\t(%s)\n", signo, |