[Patches] patch for core dump in parser
Greg Stein
gstein@lyra.org
Fri, 16 Jun 2000 17:19:48 -0700
On Fri, Jun 16, 2000 at 06:35:43PM -0400, Jeremy Hylton wrote:
>...
> --- 63,76 ----
> register int nch = n1->n_nchildren;
> register int nch1 = nch+1;
> register node *n;
> + if (nch == 32767)
> + return E_OVERFLOW;
I would highly recommend that you make that "nch >= 32767" rather than a
precise test. For some reason, if nch pops suddenly up to 32768, then you're
SOL.
(maybe the current code increments one at a time, and you will always catch
the 32767, but the test seems a bit fragile over the long haul)
Cheers,
-g
--
Greg Stein, http://www.lyra.org/