1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-03-13 06:01:03 +00:00

Prevent overflows of the port char array in extract_sockaddr.

This commit is contained in:
Con Kolivas 2012-10-12 14:55:52 +11:00
parent 7c7e51166b
commit 9ccfcee6dc

2
util.c
View File

@ -832,7 +832,7 @@ bool extract_sockaddr(struct pool *pool, char *url)
sprintf(url_address, "%.*s", url_len, url_begin);
if (port_len)
sprintf(port, "%.*s", port_len, port_start);
snprintf(port, 5, "%.*s", port_len, port_start);
else
strcpy(port, "80");