Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: zsh segfaults on $(( [#2] 0xDEADBEEF ))
- X-seq: zsh-workers 14181
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: PATCH: Re: zsh segfaults on $(( [#2] 0xDEADBEEF ))
- Date: Tue, 01 May 2001 10:33:56 +0100
- In-reply-to: Your message of "Sat, 28 Apr 2001 17:38:18 -0000." <1010428173818.ZM31273@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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 <pws@xxxxxxx> 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.
**********************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author