&& sig < NSIG)
&& sig > 0 && sig < NSIG)
int sigaction(int sig, const struct sigaction * act,              struct sigaction * oact){  struct sigaction newact;  struct sigaction *newactp;  if (sig == __pthread_sig_restart || sig == __pthread_sig_cancel)    return EINVAL;  if (act)    {      newact = *act;      if (act->sa_handler != SIG_IGN && act->sa_handler != SIG_DFL	  && sig < NSIG)	newact.sa_handler = pthread_sighandler;      newactp = &newact;    }  else    newactp = NULL;  if (__sigaction(sig, newactp, oact) == -1)    return -1;  if (sig < NSIG)    {      if (oact != NULL)	oact->sa_handler = sighandler[sig];      if (act)	sighandler[sig] = act->sa_handler;    }  return 0;}