diff options
author | Rob Landley <rob@landley.net> | 2014-05-05 21:20:11 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-05-05 21:20:11 -0500 |
commit | 4c2bd6277d5966ea7ef7d59a34838066b5c130eb (patch) | |
tree | 0524dbc4c1bc710f1633e6218e1e8b60daf203cf /toys.h | |
parent | 26b21882bfd8a3712614e94dde41a5194dda7aee (diff) | |
download | toybox-4c2bd6277d5966ea7ef7d59a34838066b5c130eb.tar.gz toybox-4c2bd6277d5966ea7ef7d59a34838066b5c130eb.tar.bz2 toybox-4c2bd6277d5966ea7ef7d59a34838066b5c130eb.zip |
Fix bug reported by Ashwini Sharma: rebound has to be at the end or toy_init() doesn't zero the rest of the struct.
Diffstat (limited to 'toys.h')
-rw-r--r-- | toys.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -119,13 +119,15 @@ extern struct toy_context { struct toy_list *which; // Which entry in toy_list is this one? char **argv; // Original command line arguments char **optargs; // Arguments left over from get_optflags() - jmp_buf *rebound; // longjmp here instead of exit when do_rebound set unsigned optflags; // Command line option flags from get_optflags() int exitval; // Value error_exit feeds to exit() int optc; // Count of optargs int exithelp; // Should error_exit print a usage message first? int old_umask; // Old umask preserved by TOYFLAG_UMASK int toycount; // Total number of commands in this build + + // This is at the end so toy_init() doesn't zero it. + jmp_buf *rebound; // longjmp here instead of exit when do_rebound set } toys; // Two big temporary buffers: one for use by commands, one for library functions |