about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/jobs.c10
2 files changed, 6 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 7281799b8..286946936 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-09-22  Clint Adams  <schizo@debian.org>
 
+	* 12860: Src/jobs.c: don't check length against PATH_MAX or
+	truncate.
+
 	* 12859: Src/string.c, Src/Zle/compresult.c:
 	dynamically allocate buffer in ztat, remove
 	duplication loop to ztrdupstrip().
diff --git a/Src/jobs.c b/Src/jobs.c
index ea96200eb..ca4b12004 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -982,15 +982,11 @@ initjob(void)
 void
 setjobpwd(void)
 {
-    int i, l;
+    int i;
 
     for (i = 1; i < MAXJOB; i++)
-	if (jobtab[i].stat && !jobtab[i].pwd) {
-	    if ((l = strlen(pwd)) >= PATH_MAX)
-		jobtab[i].pwd = ztrdup(pwd + l - PATH_MAX);
-	    else
-		jobtab[i].pwd = ztrdup(pwd);
-	}
+	if (jobtab[i].stat && !jobtab[i].pwd)
+	    jobtab[i].pwd = ztrdup(pwd);
 }
 
 /* print pids for & */