From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27969 invoked from network); 1 May 2001 09:34:30 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 1 May 2001 09:34:30 -0000 Received: (qmail 29320 invoked by alias); 1 May 2001 09:34:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14181 Received: (qmail 29308 invoked from network); 1 May 2001 09:34:23 -0000 Message-ID: To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: PATCH: Re: zsh segfaults on $(( [#2] 0xDEADBEEF )) In-Reply-To: Your message of "Sat, 28 Apr 2001 17:38:18 -0000." <1010428173818.ZM31273@candle.brasslantern.com> Date: Tue, 01 May 2001 10:33:56 +0100 From: Peter Stephenson Bart wrote: > } > } Well, this one wasn't difficult, at least. > } > } +#define BDIGBUFSIZE ((int)((sizeof(zlong) * 8) + 3)) > > Upon further reflection, I changed that 3 to a 4 in the committed version > of the patch. Just for consistency, this uses BDIGBUFSIZE in two other places which already create buffers for the same purpose. Index: Src/params.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/params.c,v retrieving revision 1.43 diff -u -r1.43 params.c --- Src/params.c 2001/04/28 17:38:01 1.43 +++ Src/params.c 2001/05/01 09:31:51 @@ -1393,7 +1393,7 @@ getstrvalue(Value v) { char *s, **ss; - char buf[(sizeof(zlong) * 8) + 4]; + char buf[BDIGBUFSIZE]; if (!v) return hcalloc(1); @@ -1535,7 +1535,7 @@ void export_param(Param pm) { - char buf[(sizeof(zlong) * 8) + 4], *val; + char buf[BDIGBUFSIZE], *val; if (PM_TYPE(pm->flags) & (PM_ARRAY|PM_HASHED)) { #if 0 /* Requires changes elsewhere in params.c and builtin.c */ -- Peter Stephenson Software Engineer CSR Ltd., Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************