Hi Rob and List,

I faced a situation where the group option parsing logic causes a Segfault.
The scenario is as follows:

Like in compress.c:
USE_COMPRESS(NEWTOY(compress, "zcd9lrg[-cd][!zgLr]",
TOYFLAG_USR|TOYFLAG_BIN))

The  '__L__' option is not in the argument list where as in the
option group has '__L__' option.

If CFG_TOYBOX_DEBUG is enabled the current implementation hits the
error_exit() otherwise it's trying to access opt->c which causes the
segfault.


Please find the patch for the same.



-- 
Thanks & Regards
Sameer Prakash Pradhan

Attachment: args.c.patch
Description: Binary data

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to