forked from Archive/PX4-Autopilot
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:
parent
61fccacd85
commit
029bbeb3db
|
@ -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).
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue