0041-proc/sig.c: Harden print_given_signals().

And signal_name_to_number().

---------------------------- adapted for newlib branch
. file has been moved to: lib/signals.c
. only 'signal_name_to_number()' was impacted
. function 'print_given_signals()' no longer exists
. thus the bulk of original patch no longer applicable

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Qualys Security Advisory 1970-01-01 00:00:00 +00:00 committed by Craig Small
parent 69b67b6f6e
commit d3ff255fa5

View File

@ -200,7 +200,7 @@ int signal_name_to_number(const char *restrict name){
if(*endp || endp==name)
return -1; /* not valid */
}
if(val+SIGRTMIN>127)
if(val<0 || val+SIGRTMIN>127)
return -1; /* not valid */
return val+offset;
}