diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-09-13 20:14:51 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-09-13 20:14:51 +0000 |
commit | 9120a27d14a927091da009248f51d146f93d040a (patch) | |
tree | ea5c6546431e2be344a0fc271d65878229fa16ef /nuttx/netutils/thttpd/thttpd_alloc.c | |
parent | 3e2be1aaa3fcc433ee79400409220135a86a716e (diff) | |
download | px4-nuttx-9120a27d14a927091da009248f51d146f93d040a.tar.gz px4-nuttx-9120a27d14a927091da009248f51d146f93d040a.tar.bz2 px4-nuttx-9120a27d14a927091da009248f51d146f93d040a.zip |
CGI tried to execute using relative path
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2047 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/netutils/thttpd/thttpd_alloc.c')
-rwxr-xr-x | nuttx/netutils/thttpd/thttpd_alloc.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nuttx/netutils/thttpd/thttpd_alloc.c b/nuttx/netutils/thttpd/thttpd_alloc.c index 85f79adc4..a4d64e3c6 100755 --- a/nuttx/netutils/thttpd/thttpd_alloc.c +++ b/nuttx/netutils/thttpd/thttpd_alloc.c @@ -147,6 +147,25 @@ void httpd_free(FAR void *ptr) } #endif +#ifdef CONFIG_THTTPD_MEMDEBUG +FAR char *httpd_strdup(const char *str) +{ + FAR char *newstr = strdup(str); + if (!newstr) + { + ndbg("strdup of %s failed\n", str); + } + else + { + nvdbg("strdup'ed %s\n", str); + g_nallocations++; + g_allocated += (strlen(str)+1); + } + httpd_memstats(); + return newstr; +} +#endif + /* Helpers to implement dynamically allocated strings */ void httpd_realloc_str(char **pstr, size_t *maxsize, size_t size) |