From af35036b945cb0f47c68bb47d9316500d12c6913 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 26 Aug 2012 22:28:21 +0000 Subject: Add terminating NULL to argv[] list git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5055 42af7a65-404d-4744-a932-0658087f49c3 --- apps/netutils/thttpd/thttpd_cgi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/netutils') diff --git a/apps/netutils/thttpd/thttpd_cgi.c b/apps/netutils/thttpd/thttpd_cgi.c index 3d2eb57b8..0c23a2587 100755 --- a/apps/netutils/thttpd/thttpd_cgi.c +++ b/apps/netutils/thttpd/thttpd_cgi.c @@ -988,7 +988,7 @@ errout: int cgi(httpd_conn *hc) { char arg[16]; - char *argv[1]; + char *argv[2]; pid_t child; int retval = ERROR; @@ -1019,6 +1019,7 @@ int cgi(httpd_conn *hc) snprintf(arg, 16, "%p", hc); /* task_create doesn't handle binary arguments. */ argv[0] = arg; + argv[1] = NULL; #ifndef CONFIG_CUSTOM_STACK child = task_create("CGI child", CONFIG_THTTPD_CGI_PRIORITY, -- cgit v1.2.3