Re: [PATCH] dash: Fix stack overflow from infinite recursion in script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

> >  > +             if (evalcount++ >= MAX_RECURSION)
> >  > +                     sh_error("Maximum function recursion depth (%d) \
> >  ...
> >  > +#define MAX_RECURSION 1000   /* maximum recursion level */
[…]
> A recursion limit is not without precedent. CPython sets a platform-
> dependent recursion limit for this same purpose:

CPython's dumb-yet-highly-effective limit was actually my source of
inspiration for this patch.


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@xxxxxxxxxx 🍥 chris-lamb.co.uk
       `-




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux