From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3) with ESMTP id EAA07605 for ; Sun, 26 May 1996 04:18:21 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id OAA06155; Sat, 25 May 1996 14:03:03 -0400 (EDT) Resent-Date: Sat, 25 May 1996 14:03:03 -0400 (EDT) Message-Id: <199605251802.OAA20740@redwood.skiles.gatech.edu> To: zsh-workers@math.gatech.edu Subject: Re: clwords bugfix In-reply-to: Your message of "Sat, 25 May 1996 15:38:51 BST." <27894.199605251438@stone.dcs.warwick.ac.uk> Date: Sat, 25 May 1996 14:02:46 -0400 From: Richard Coleman Resent-Message-ID: <"b0tlE1.0.5W1.Mjqfn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1175 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > There is a bug in zle_tricky.c (ooh, what a surprise). When the > clwords array needs to be resized, the new part of the array is > supposed to be initialised to NULLs. The current version has > an off-by-one error, meaning that it clears the current element > (which is immediately freed, so there is only a memory leak here), > but it doesn't clear the new last element (this causes crashes). > The patch below fixes this, and changes it to use a looped assignment > rather than memset, as NULL is not all-bits-zero on all machines. > > -zefram What Unix has a NULL that isn't all-bits-zero? That would break a tremendous amount of code. There all lots of places in zsh that assume this and use memset. I don't think we should change this. rc