From 81f950dd90b5b515b957a071c1a574803aafd152 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 13 May 2026 23:28:43 +0200 Subject: [PATCH] strparse: split a multi-line assert into many separate ones This way we can better tell exactly which condition that triggers. Like in fuzzer logs. Closes #21599 --- lib/curlx/strparse.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/curlx/strparse.c b/lib/curlx/strparse.c index 7866b2087a..3082a6740a 100644 --- a/lib/curlx/strparse.c +++ b/lib/curlx/strparse.c @@ -49,9 +49,14 @@ void curlx_str_trim(struct Curl_str *out, size_t len) int curlx_str_until(const char **linep, struct Curl_str *out, const size_t max, char delim) { - const char *s = *linep; + const char *s; size_t len = 0; - DEBUGASSERT(linep && *linep && out && max && delim); + DEBUGASSERT(linep); + DEBUGASSERT(*linep); + DEBUGASSERT(out); + DEBUGASSERT(max); + DEBUGASSERT(delim); + s = *linep; curlx_str_init(out); while(*s && (*s != delim)) {