apps: avoid memory overrun.
authorPauli <paul.dale@oracle.com>
Wed, 24 Jun 2020 10:21:15 +0000 (20:21 +1000)
committerDr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com>
Wed, 24 Jun 2020 19:54:52 +0000 (21:54 +0200)
NULL terminate the built in "help" argv array to avoid
reading beyond the end.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/12258)

apps/openssl.c

index fdf4a746f8096cdb35d6845d02c60bfde41e2b7e..3593c2b9f24290cfb948bdc23f1f1d8aa413a839 100644 (file)
@@ -205,7 +205,7 @@ static void setup_trace(const char *str)
 }
 #endif /* OPENSSL_NO_TRACE */
 
-static char *help_argv[] = { "help" };
+static char *help_argv[] = { "help", NULL };
 
 int main(int argc, char *argv[])
 {