mirror of
https://github.com/curl/curl.git
synced 2026-06-03 05:04:17 +03:00
tool_help: rectify a bad assert
The condition was wrong, and now it also verifies 'tlen'. Reported-by: Gao Liyou Ref: #21825 Closes #21837
This commit is contained in:
parent
669e795e94
commit
7d2382ebfa
1 changed files with 3 additions and 2 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue