aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-08-29 14:32:17 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-29 14:32:17 +0200
commit6016181b68a9e8a9fb99893242851128b6bd5656 (patch)
tree5aeff977b9cf7b68a32dc7e9efe183a5f7173ba6 /libbb
parent55af51c66d0dae27d188974820c4a7d53dd0be55 (diff)
downloadbusybox-w32-6016181b68a9e8a9fb99893242851128b6bd5656.tar.gz
busybox-w32-6016181b68a9e8a9fb99893242851128b6bd5656.tar.bz2
busybox-w32-6016181b68a9e8a9fb99893242851128b6bd5656.zip
hush: GETOPT_RESET() _after_ getopts too.
NOEXEC'ed applets which use getopt() need this. function old new delta builtin_getopts 403 413 +10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/getopt32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/getopt32.c b/libbb/getopt32.c
index f778c6e89..378510063 100644
--- a/libbb/getopt32.c
+++ b/libbb/getopt32.c
@@ -517,7 +517,7 @@ vgetopt32(char **argv, const char *applet_opts, const char *applet_long_options,
517 } 517 }
518 518
519 /* In case getopt32 was already called: 519 /* In case getopt32 was already called:
520 * reset the libc getopt() function, which keeps internal state. 520 * reset libc getopt() internal state.
521 * run_nofork_applet() does this, but we might end up here 521 * run_nofork_applet() does this, but we might end up here
522 * also via gunzip_main() -> gzip_main(). Play safe. 522 * also via gunzip_main() -> gzip_main(). Play safe.
523 */ 523 */