When asked to parse for a string with max zero bytes, it will always
return error and no longer trigger an assert. This saves the caller from
having to check for this condition.
Closes #21600
}
/* Get a word until the first DELIM or end of string. At least one byte long.
- return non-zero on error */
+ return non-zero on error. If 'max' is zero, it will always return error. */
int curlx_str_until(const char **linep, struct Curl_str *out,
const size_t max, char delim)
{
DEBUGASSERT(linep);
DEBUGASSERT(*linep);
DEBUGASSERT(out);
- DEBUGASSERT(max);
DEBUGASSERT(delim);
s = *linep;