check snprintf return value for error

pull/152/head
rofl0r 2016-12-20 22:18:21 +00:00
parent 6ae959e051
commit bf6eeff75a
1 changed files with 1 additions and 1 deletions

View File

@ -244,7 +244,7 @@ static int tunnel_to(int sock, ip_type ip, unsigned short port, proxy_type pt, c
ulen ? "Proxy-Authorization: Basic " : dst,
dst, ulen ? "\r\n" : dst);
if(len != send(sock, buff, len, 0))
if(len < 0 || len != send(sock, buff, len, 0))
goto err;
len = 0;