linuxthreads/signals: do not restore handler for invalid signal
linuxthreads/signals: do not restore handler for invalid signal

Invalid signals have no handlers so when trying to restore the old
handler to a bad signal a SIGSEGV occurs. This is because the library
tries to store the old handler to an invalid memory area where it things
the bad signal lives.

URL: https://bugs.busybox.net/show_bug.cgi?id=4640
Signed-off-by: Markos Chandras <5cdbcb0e11d2b5ebc39222958c54a1c6329d0c9d@imgtec.com>
Signed-off-by: Mike Frysinger <8f3f75c74bd5184edcfa6534cab3c13a00a2f794@gentoo.org>

czankel/xtensa-uclibc,kraj/uclibc-ng,foss-xtensa/uClibc,waweber/uclibc-clang,wbx-github/uclibc-ng,hjl-tools/uClibc,czankel/xtensa-uclibc,groundwater/uClibc,mephi42/uClibc,ffainelli/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,ffainelli/uClibc,ddcc/klee-uclibc-0.9.33.2,brgl/uclibc-ng,groundwater/uClibc,skristiansson/uClibc-or1k,foss-for-synopsys-dwc-arc-processors/uClibc,ddcc/klee-uclibc-0.9.33.2,waweber/uclibc-clang,majek/uclibc-vx32,waweber/uclibc-clang,ndmsystems/uClibc,ndmsystems/uClibc,brgl/uclibc-ng,wbx-github/uclibc-ng,atgreen/uClibc-moxie,hjl-tools/uClibc,atgreen/uClibc-moxie,atgreen/uClibc-moxie,ndmsystems/uClibc,hwoarang/uClibc,foss-xtensa/uClibc,foss-xtensa/uClibc,kraj/uClibc,wbx-github/uclibc-ng,hwoarang/uClibc,majek/uclibc-vx32,groundwater/uClibc,brgl/uclibc-ng,foss-for-synopsys-dwc-arc-processors/uClibc,groundwater/uClibc,mephi42/uClibc,skristiansson/uClibc-or1k,brgl/uclibc-ng,wbx-github/uclibc-ng,ffainelli/uClibc,foss-xtensa/uClibc,groundwater/uClibc,ffainelli/uClibc,majek/uclibc-vx32,hwoarang/uClibc,ddcc/klee-uclibc-0.9.33.2,hjl-tools/uClibc,hjl-tools/uClibc,kraj/uClibc,kraj/uclibc-ng,kraj/uclibc-ng,czankel/xtensa-uclibc,hwoarang/uClibc,mephi42/uClibc,waweber/uclibc-clang,majek/uclibc-vx32,ndmsystems/uClibc,kraj/uclibc-ng,atgreen/uClibc-moxie,ddcc/klee-uclibc-0.9.33.2,kraj/uClibc,ffainelli/uClibc,hjl-tools/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,skristiansson/uClibc-or1k,czankel/xtensa-uclibc,kraj/uClibc,skristiansson/uClibc-or1k,mephi42/uClibc