9
0
Fork 0

Add terminating NULL to argv[] list

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5055 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2012-08-26 22:28:21 +00:00
parent a12112772a
commit ad1c1c1042
2 changed files with 6 additions and 1 deletions

View File

@ -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).

View File

@ -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,