[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8344: (substring ...) crashes on large vectors
From: |
Andreas Schwab |
Subject: |
bug#8344: (substring ...) crashes on large vectors |
Date: |
Sun, 27 Mar 2011 09:52:58 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
Paul Eggert <eggert@cs.ucla.edu> writes:
> @@ -373,10 +373,10 @@
> path = Fsubstring (path, make_number (2), Qnil);
>
> new_argv_volatile = new_argv = (const unsigned char **)
> - alloca (max (2, nargs - 2) * sizeof (char *));
> + alloca ((nargs > 4 ? nargs - 2 : 2) * sizeof (char *));
That should perhaps be converted to use SAFE_ALLOCA.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."