components/zsh/patches/4500760.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 11 Mar 2013 10:38:09 -0700
branchs11-update
changeset 2520 ceec631e74d1
parent 837 3496f33edfbb
permissions -rw-r--r--
Close of build 10.
--- zsh-4.3.17/Src/jobs.c	Sat Dec 10 14:40:56 2011
+++ zsh-4.3.17/Src/jobs.c	Sat May 19 23:24:16 2012
@@ -2157,9 +2157,15 @@
 
     /* check for, and interpret, a signal specifier */
     if (*argv && **argv == '-') {
-	if (idigit((*argv)[1]))
+	if (idigit((*argv)[1])) {
+	    char *endp;
 	    /* signal specified by number */
-	    sig = atoi(*argv + 1);
+	    sig = zstrtol(*argv + 1, &endp, 10);
+	    if (*endp) {
+		zwarnnam(nam, "invalid signal number: %s", *argv);
+		return 1;
+	    }
+	}
 	else if ((*argv)[1] != '-' || (*argv)[2]) {
 	    char *signame;