sslproc: check number of arguments to zipstats command
This commit is contained in:
parent
ed9f6a6565
commit
a940f54623
1 changed files with 5 additions and 1 deletions
|
@ -356,7 +356,11 @@ ssl_process_zipstats(ssl_ctl_t * ctl, ssl_ctl_buf_t * ctl_buf)
|
||||||
struct Client *server;
|
struct Client *server;
|
||||||
struct ZipStats *zips;
|
struct ZipStats *zips;
|
||||||
char *parv[7];
|
char *parv[7];
|
||||||
(void) rb_string_to_array(ctl_buf->buf, parv, 6);
|
int parc = rb_string_to_array(ctl_buf->buf, parv, sizeof(parv) - 1);
|
||||||
|
|
||||||
|
if (parc < 6)
|
||||||
|
return;
|
||||||
|
|
||||||
server = find_server(NULL, parv[1]);
|
server = find_server(NULL, parv[1]);
|
||||||
if(server == NULL || server->localClient == NULL || !IsCapable(server, CAP_ZIP))
|
if(server == NULL || server->localClient == NULL || !IsCapable(server, CAP_ZIP))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue