On Oct 13,  1:26pm, [email protected] (Neil Ormos) wrote:
-- Subject: Bug#645238: tcsh(1) segfaults when prompt includes %j and there a

Here's a fix:

christos

Index: Fixes
===================================================================
RCS file: /p/tcsh/cvsroot/tcsh/Fixes,v
retrieving revision 1.441
retrieving revision 1.442
diff -u -r1.441 -r1.442
--- Fixes       29 Nov 2011 18:38:54 -0000      1.441
+++ Fixes       14 Dec 2011 16:33:23 -0000      1.442
@@ -1,3 +1,5 @@
+ 88. Fix debian bug #645238: tcsh segfaults when prompt includes %j and
+     there are more than 10 jobs.
  87. PR/155: Default $anyerror to set for backward compatibility
  86. PR/149: Don't print -1 in %j (Vojtech Vitek)
  85. handle -- on chdir commands as the end of options processing so that
Index: tc.func.c
===================================================================
RCS file: /p/tcsh/cvsroot/tcsh/tc.func.c,v
retrieving revision 3.147
retrieving revision 3.148
diff -u -r3.147 -r3.148
--- tc.func.c   27 Feb 2011 00:15:17 -0000      3.147
+++ tc.func.c   14 Dec 2011 16:36:44 -0000      3.148
@@ -1,4 +1,4 @@
-/* $Header: /p/tcsh/cvsroot/tcsh/tc.func.c,v 3.147 2011/02/27 00:15:17 
christos Exp $ */
+/* $Header: /p/tcsh/cvsroot/tcsh/tc.func.c,v 3.148 2011/12/14 16:36:44 
christos Exp $ */
 /*
  * tc.func.c: New tcsh builtins.
  */
@@ -32,7 +32,7 @@
  */
 #include "sh.h"
 
-RCSID("$tcsh: tc.func.c,v 3.147 2011/02/27 00:15:17 christos Exp $")
+RCSID("$tcsh: tc.func.c,v 3.148 2011/12/14 16:36:44 christos Exp $")
 
 #include "ed.h"
 #include "ed.defns.h"          /* for the function names */
@@ -174,7 +174,7 @@
     do {
        *p++ = un % 10 + '0';
        un /= 10;
-    } while ((pad && --min_digits > 0) || un != 0);
+    } while ((pad && (ssize_t)--min_digits > 0) || un != 0);
 
     res = xmalloc((p - buf + 2) * sizeof(*res));
     s = res;



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to