mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 03:43:34 +08:00
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:
@@ -280,3 +280,7 @@
|
|||||||
configuration (from Richard Cochran).
|
configuration (from Richard Cochran).
|
||||||
|
|
||||||
6.22 2012-xx-xx Gregory Nutt <gnutt@nuttx.org>
|
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)
|
int cgi(httpd_conn *hc)
|
||||||
{
|
{
|
||||||
char arg[16];
|
char arg[16];
|
||||||
char *argv[1];
|
char *argv[2];
|
||||||
pid_t child;
|
pid_t child;
|
||||||
int retval = ERROR;
|
int retval = ERROR;
|
||||||
|
|
||||||
@@ -1019,6 +1019,7 @@ int cgi(httpd_conn *hc)
|
|||||||
|
|
||||||
snprintf(arg, 16, "%p", hc); /* task_create doesn't handle binary arguments. */
|
snprintf(arg, 16, "%p", hc); /* task_create doesn't handle binary arguments. */
|
||||||
argv[0] = arg;
|
argv[0] = arg;
|
||||||
|
argv[1] = NULL;
|
||||||
|
|
||||||
#ifndef CONFIG_CUSTOM_STACK
|
#ifndef CONFIG_CUSTOM_STACK
|
||||||
child = task_create("CGI child", CONFIG_THTTPD_CGI_PRIORITY,
|
child = task_create("CGI child", CONFIG_THTTPD_CGI_PRIORITY,
|
||||||
|
|||||||
Reference in New Issue
Block a user