Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37561983
en ru br
ALT Linux repos
S:6.20.00-alt4
5.0: 6.16.00-alt1
4.1: 6.16.00-alt0.M41.1
4.0: 6.14.00-alt2
3.0: 6.14.00-alt1

Group :: Shells
RPM: tcsh

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: tcsh-6.20.00-alt-maxwidth.diff
Download


diff -burN tcsh-6.20.00.orig/tw.parse.c tcsh-6.20.00/tw.parse.c
--- tcsh-6.20.00.orig/tw.parse.c	2015-10-16 17:59:56.000000000 +0300
+++ tcsh-6.20.00/tw.parse.c	2017-07-20 11:44:02.741303110 +0300
@@ -2173,6 +2173,8 @@
 	     (Strchr(val, 'x') != NULL);
 
     for (i = 0; i < count; i++)	{ /* find widest string */
+	/* check before converting to uint */
+	if (NLSStringWidth(items[i]) > 0)
 	maxwidth = max(maxwidth, (unsigned int) NLSStringWidth(items[i]));
     }
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin