sh: null check signame list since sig 0 is not valid
Change-Id: I1b293246ea1d822e098d0581830500e93633a879 Signed-off-by: Dima Zavin <dima@android.com>
This commit is contained in:
parent
90493929b2
commit
8d758271d4
1 changed files with 1 additions and 1 deletions
|
@ -100,7 +100,7 @@ signame_to_signum(const char *p)
|
|||
p += 3;
|
||||
|
||||
for (i = 0; i < NSIG; ++i)
|
||||
if (strcasecmp (p, sys_signame[i]) == 0)
|
||||
if (sys_signame[i] && (strcasecmp (p, sys_signame[i]) == 0))
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue