mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
Extend the allocation-failure check to httpd_strdup(), the thttpd-local wrapper that has the same failure contract as strdup(). This is logically separable from the direct strdup()/asprintf() fixes: it prevents using hs->hostname before checking whether the wrapped string allocation succeeded, and releases the partially allocated server state on failure. The scope intentionally does not extend to malloc(), calloc(), or other raw allocators because #1727 specifically calls out strdup()/asprintf(), and covering all allocation APIs would make this PR much broader. Signed-off-by: Nightt <87569709+nightt5879@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| cgi-src | ||
| .gitignore | ||
| CMakeLists.txt | ||
| config.h | ||
| fdwatch.c | ||
| fdwatch.h | ||
| Kconfig | ||
| libhttpd.c | ||
| libhttpd.h | ||
| Make.defs | ||
| Makefile | ||
| mime_types.h | ||
| tdate_parse.c | ||
| tdate_parse.h | ||
| thttpd.c | ||
| thttpd_alloc.c | ||
| thttpd_alloc.h | ||
| thttpd_cgi.c | ||
| thttpd_cgi.h | ||
| thttpd_strings.c | ||
| thttpd_strings.h | ||
| timers.c | ||
| timers.h | ||