[Toybox] glitch in toy_init()

Rob Landley rob at landley.net
Tue May 6 04:49:24 PDT 2014


On 05/05/14 06:45, Ashwini Sharma wrote:
> Hi Rob, list,
> 
> in __toy_init()__ function, the __toys__ variable is not reset
> properly.
> memset(&toys, 0, offsetof(struct toy_context, rebound));
> 
> reason: the __toys__ is set to __0__ only until __rebound__
> is found. Due to the restructuring of __toy_context__, it is failing.
> 
> This causes an issue when __xexec()__ is called and has toys.optflags or
> others are set.
> May be need to put rebound at the bottom of struct again.
> 
> regards,
> Ashwini

Indeed. And I added a comment to remind me why it lives there.

Thanks,

Rob

 1399376964.0


More information about the Toybox mailing list