dynbuf: assert on curlx_dyn_addf use with just "%s"

Because it is wasteful and should be done better.

Closes #18194
This commit is contained in:
Daniel Stenberg 2025-08-06 00:52:04 +02:00
parent 7aa04d3395
commit bf5265ad11
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -231,6 +231,7 @@ CURLcode curlx_dyn_addf(struct dynbuf *s, const char *fmt, ...)
DEBUGASSERT(s);
DEBUGASSERT(s->init == DYNINIT);
DEBUGASSERT(!s->leng || s->bufr);
DEBUGASSERT(strcmp(fmt, "%s")); /* use curlx_dyn_add instead */
va_start(ap, fmt);
result = curlx_dyn_vaddf(s, fmt, ap);
va_end(ap);