summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/jobs.c2
-rw-r--r--Src/utils.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/Src/jobs.c b/Src/jobs.c
index d5658d2eb..d0916174f 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -2113,7 +2113,7 @@ bin_kill(char *nam, char **argv, UNUSED(Options ops), UNUSED(int func))
 		}
 		sig = zstrtol(*argv, &endp, 10);
 		if (*endp) {
-		    zwarnnam(nam, "invalid signal number: %s", signame);
+		    zwarnnam(nam, "invalid signal number: %s", *argv);
 		    return 1;
 		}
 	    } else {
diff --git a/Src/utils.c b/Src/utils.c
index b807eea08..230951ffc 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -3427,8 +3427,11 @@ spname(char *oldname)
      * otherwise a copy of oldname with a corrected prefix is returned.  *
      * Rationale for this, if there ever was any, has been forgotten.    */
     for (;;) {
-	while (*old == '/')
+	while (*old == '/') {
+	    if ((new - newname) >= (sizeof(newname)-1))
+		return NULL;
 	    *new++ = *old++;
+	}
 	*new = '\0';
 	if (*old == '\0')
 	    return newname;