Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
6334f553
Commit
6334f553
authored
Apr 18, 2019
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't rely on unsigned -1 to be huge
parent
fc1c056a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
vcli_serve.c
lib/libvarnish/vcli_serve.c
+4
-3
No files found.
lib/libvarnish/vcli_serve.c
View file @
6334f553
...
...
@@ -206,11 +206,12 @@ VCLS_func_help_json(struct cli *cli, const char * const *av, void *priv)
static
void
cls_dispatch
(
struct
cli
*
cli
,
const
struct
cli_proto
*
cp
,
char
*
const
*
av
,
unsigned
ac
)
char
*
const
*
av
,
int
ac
)
{
int
json
=
0
;
AN
(
av
);
assert
(
ac
>=
0
);
VSB_clear
(
cli
->
sb
);
...
...
@@ -234,7 +235,7 @@ cls_dispatch(struct cli *cli, const struct cli_proto *cp,
return
;
}
if
(
ac
-
1
>
cp
->
desc
->
maxarg
+
json
)
{
if
(
cp
->
desc
->
maxarg
>=
0
&&
ac
-
1
>
cp
->
desc
->
maxarg
+
json
)
{
VCLI_Out
(
cli
,
"Too many parameters
\n
"
);
VCLI_SetResult
(
cli
,
CLIS_TOOMANY
);
return
;
...
...
@@ -257,7 +258,7 @@ cls_exec(struct VCLS_fd *cfd, char * const *av)
struct
VCLS
*
cs
;
struct
cli_proto
*
clp
;
struct
cli
*
cli
;
unsigned
na
;
int
na
;
ssize_t
len
;
char
*
s
;
unsigned
lim
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment