sslproc: check number of arguments to zipstats command

This commit is contained in:
Simon Arlott 2017-07-28 21:28:44 +01:00
parent 705ca33e17
commit ce15ac6c0b
No known key found for this signature in database
GPG key ID: C8975F2043CA5D24

View file

@ -357,7 +357,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;