Lines 271-277
static void tftp_send_first(tftp_state_d
Link Here
|
271 |
/* If we are downloading, send an RRQ */ |
271 |
/* If we are downloading, send an RRQ */ |
272 |
state->spacket.event = htons(TFTP_EVENT_RRQ); |
272 |
state->spacket.event = htons(TFTP_EVENT_RRQ); |
273 |
} |
273 |
} |
274 |
sprintf((char *)state->spacket.u.request.data, "%s%c%s%c", |
274 |
snprintf((char *)state->spacket.u.request.data, 512, "%s%c%s%c", |
275 |
filename, '\0', mode, '\0'); |
275 |
filename, '\0', mode, '\0'); |
276 |
sbytes = 4 + (int)strlen(filename) + (int)strlen(mode); |
276 |
sbytes = 4 + (int)strlen(filename) + (int)strlen(mode); |
277 |
sbytes = sendto(state->sockfd, (void *)&state->spacket, |
277 |
sbytes = sendto(state->sockfd, (void *)&state->spacket, |