zsh-workers
 help / color / mirror / code / Atom feed
* stat module prints garbage in 3.1.4
@ 1998-06-12 21:17 Goran Larsson
  0 siblings, 0 replies; only message in thread
From: Goran Larsson @ 1998-06-12 21:17 UTC (permalink / raw)
  To: zsh-workers

The function statmodeprint in file zsh-3.1.4/Src/Modules/stat.c
fails to terminate the string built in the "pm" variable.
The following patch fixes this.

---->8-------->8-------->8-------->8-------->8-------->8-------->8----
*** stat.c,DIST	Fri May 29 00:03:03 1998
--- stat.c	Fri Jun 12 23:09:02 1998
***************
*** 85,90 ****
--- 85,91 ----
  
  	for (i = 1; i <= 9; i++)
  	    pm[i] = (mode & *mfp++) ? modes[i] : '-';
+ 	pm[10] = '\0';
  
  	if (mode & S_ISUID)
  	    pm[3] = (mode & S_IXUSR) ? 's' : 'S';
---->8-------->8-------->8-------->8-------->8-------->8-------->8----

-- 
 Goran Larsson            hoh@approve.se
 I was an atheist,        http://home1.swipnet.se/%7Ew-12153/
 until I found out I was God.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-06-12 21:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-12 21:17 stat module prints garbage in 3.1.4 Goran Larsson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).