aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/getopt32.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libbb/getopt32.c b/libbb/getopt32.c
index 107102329..c7c8cb79c 100644
--- a/libbb/getopt32.c
+++ b/libbb/getopt32.c
@@ -355,6 +355,7 @@ getopt32(int argc, char **argv, const char *applet_opts, ...)
}
/* count == no. of longopts + 1 */
long_options = alloca(count * sizeof(*long_options));
+ memset(long_options, 0, count * sizeof(*long_options));
i = 0;
optstr = applet_long_options;
while (--count) {