Good afternoon list,

I think I found a bug in tftp_tx() in tftp.c. If a data resend is done after reception of an ACK/OACK, the call to sendto is:

lines 740..744 in 7.21.2:

          /* Re-send the data packet */
          sbytes = sendto(state->sockfd, (void *)&state->spacket,
                          4+state->sbytes, SEND_4TH_ARG,
                          (struct sockaddr *)&state->remote_addr,
                          state->remote_addrlen);

However, the second parameter should be (rather obviously, and in line with all other data sendto() calls):
         ..., (void *)state->spacket.data, ...

I noticed this because tcpdump couldn't parse the resent message correctly. After my change, this is fixed.

Rutger Hofman
http://www.rfidguardian.org

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to