From: Daniel Stenberg Date: Tue, 2 Jun 2026 06:18:53 +0000 (+0200) Subject: tool_help: rectify a bad assert X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=7d2382ebfacc7a3c7bdfb47994be9341beee645a;p=thirdparty%2Fcurl.git tool_help: rectify a bad assert The condition was wrong, and now it also verifies 'tlen'. Reported-by: Gao Liyou Ref: #21825 Closes #21837 --- diff --git a/src/tool_help.c b/src/tool_help.c index 212972f382..c9d76d5d20 100644 --- a/src/tool_help.c +++ b/src/tool_help.c @@ -166,8 +166,9 @@ void inithelpscan(struct scan_ctx *ctx, ctx->flen = strlen(arg); ctx->endarg = endarg; ctx->elen = strlen(endarg); - DEBUGASSERT((ctx->elen < sizeof(ctx->rbuf)) || - (ctx->flen < sizeof(ctx->rbuf))); + DEBUGASSERT((ctx->elen < sizeof(ctx->rbuf)) && + (ctx->flen < sizeof(ctx->rbuf)) && + (ctx->tlen < sizeof(ctx->rbuf))); ctx->show = 0; ctx->olen = 0; memset(ctx->rbuf, 0, sizeof(ctx->rbuf));