tftp: fix my bug

This commit is contained in:
Denis Vlasenko 2007-02-08 20:41:41 +00:00
parent 0aa6ba5d44
commit b477e18c1e

View File

@ -280,7 +280,7 @@ static int tftp(
unsigned from_port; unsigned from_port;
case 1: case 1:
from->len = peer_lsa->len; from->len = peer_lsa->len;
memset(from, 0, peer_lsa->len); memset(&from->sa, 0, peer_lsa->len);
len = recvfrom(socketfd, rbuf, tftp_bufsize, 0, len = recvfrom(socketfd, rbuf, tftp_bufsize, 0,
&from->sa, &from->len); &from->sa, &from->len);
if (len < 0) { if (len < 0) {