blob: c92c66417f2ec30da06e55a21ea958f478bf62bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
diff -Nrup curl-7.15.1/lib/tftp.c curl-7.15.1/lib/tftp.c
--- curl-7.15.1/lib/tftp.c 2005-12-05 15:10:37.000000000 -0500
+++ curl-7.15.1/lib/tftp.c 2006-03-18 20:16:02.000000000 -0500
@@ -271,7 +271,7 @@ static void tftp_send_first(tftp_state_d
/* If we are downloading, send an RRQ */
state->spacket.event = htons(TFTP_EVENT_RRQ);
}
- sprintf((char *)state->spacket.u.request.data, "%s%c%s%c",
+ snprintf((char *)state->spacket.u.request.data, 512, "%s%c%s%c",
filename, '\0', mode, '\0');
sbytes = 4 + (int)strlen(filename) + (int)strlen(mode);
sbytes = sendto(state->sockfd, (void *)&state->spacket,
|