summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xapps/ChangeLog.txt4
-rwxr-xr-xapps/netutils/thttpd/thttpd_cgi.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index 20895f07b6..6c151ae50f 100755
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -280,3 +280,7 @@
configuration (from Richard Cochran).
6.22 2012-xx-xx Gregory Nutt <gnutt@nuttx.org>
+
+ * apps/netutils/thttpd/thttpd_cgi.c: Missing NULL in argv[]
+ list (contributed by Kate).
+
diff --git a/apps/netutils/thttpd/thttpd_cgi.c b/apps/netutils/thttpd/thttpd_cgi.c
index 3d2eb57b8b..0c23a2587f 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,