diff mbox series

suricatta: Fix command line argument size allocation

Message ID 20210726133510.56382-1-christian.storm@siemens.com
State Accepted
Headers show
Series suricatta: Fix command line argument size allocation | expand

Commit Message

Christian Storm July 26, 2021, 1:35 p.m. UTC
serverargv is, as duplicate of the command line arguments
passed to the suricatta server, an array of char pointers.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
---
 suricatta/suricatta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/suricatta/suricatta.c b/suricatta/suricatta.c
index 59b73c4..29bba2e 100644
--- a/suricatta/suricatta.c
+++ b/suricatta/suricatta.c
@@ -168,7 +168,7 @@  int start_suricatta(const char *cfgfname, int argc, char *argv[])
 	 * to pass unchanged to the server instance.
 	 * getopt() will change them when called here
 	 */
-	serverargv = (char **)malloc(argc * sizeof(char **));
+	serverargv = (char **)malloc(argc * sizeof(char *));
 	if (!serverargv) {
 		ERROR("OOM starting suricatta, exiting !");
 		exit(EXIT_FAILURE);