nuttx-apps/netutils/thttpd
Nightt 8568013436 netutils/thttpd: Apply the same check to related allocation sites
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>
2026-05-23 16:30:52 -04:00
..
cgi-src netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
.gitignore build: Remve the unnecessary .gitignore 2020-05-23 15:56:35 +01:00
CMakeLists.txt netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
config.h netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
fdwatch.c include/debug.h: Use <nuttx/debug.h> in apps 2026-04-11 10:39:27 -03:00
fdwatch.h netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
Kconfig netutils/thttpd-fix-broken-CGI-and-fixup-Kconfig 2025-07-03 10:42:11 +08:00
libhttpd.c netutils/thttpd: Apply the same check to related allocation sites 2026-05-23 16:30:52 -04:00
libhttpd.h netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
Make.defs netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
Makefile netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
mime_types.h netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
tdate_parse.c !apps: replace sclock_t with clock_t and drop redundant time_t/off_t casts 2026-05-11 17:38:32 +08:00
tdate_parse.h netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
thttpd.c include/debug.h: Use <nuttx/debug.h> in apps 2026-04-11 10:39:27 -03:00
thttpd_alloc.c include/debug.h: Use <nuttx/debug.h> in apps 2026-04-11 10:39:27 -03:00
thttpd_alloc.h netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
thttpd_cgi.c include/debug.h: Use <nuttx/debug.h> in apps 2026-04-11 10:39:27 -03:00
thttpd_cgi.h netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
thttpd_strings.c netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
thttpd_strings.h netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00
timers.c include/debug.h: Use <nuttx/debug.h> in apps 2026-04-11 10:39:27 -03:00
timers.h netutils: migrate the license to ASF 2024-12-21 13:53:10 +08:00