From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3347 invoked from network); 12 Jun 1998 21:26:24 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 12 Jun 1998 21:26:24 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id RAA07233; Fri, 12 Jun 1998 17:20:35 -0400 (EDT) Resent-Date: Fri, 12 Jun 1998 17:20:35 -0400 (EDT) Message-Id: Date: Fri, 12 Jun 1998 23:17:04 +0200 (MET-DST) From: Goran Larsson Subject: stat module prints garbage in 3.1.4 To: zsh-workers@math.gatech.edu MIME-Version: 1.0 Content-Type: TEXT/plain; CHARSET=US-ASCII Resent-Message-ID: <"2F-rp2.0.ym1.YkPWr"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4105 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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.