cURL / Mailing Lists / curl-library / Single Mail

curl-library

Bug in tftp.c

From: Rutger Hofman <rutger_at_cs.vu.nl>
Date: Wed, 10 Nov 2010 13:24:05 +0100

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
Received on 2010-11-10