Changeset View
Changeset View
Standalone View
Standalone View
libexec/tftpd/tftpd.c
Show First 20 Lines • Show All 445 Lines • ▼ Show 20 Lines | while (*slash) | ||||
*++ptr = *++slash; | *++ptr = *++slash; | ||||
} | } | ||||
} | } | ||||
static char * | static char * | ||||
parse_header(int peer, char *recvbuffer, size_t size, | parse_header(int peer, char *recvbuffer, size_t size, | ||||
char **filename, char **mode) | char **filename, char **mode) | ||||
{ | { | ||||
char *cp; | |||||
int i; | |||||
struct formats *pf; | struct formats *pf; | ||||
char *cp; | |||||
size_t i; | |||||
*mode = NULL; | *mode = NULL; | ||||
cp = recvbuffer; | cp = recvbuffer; | ||||
i = get_field(peer, recvbuffer, size); | i = get_field(peer, recvbuffer, size); | ||||
if (i >= PATH_MAX) { | if (i >= PATH_MAX) { | ||||
tftp_log(LOG_ERR, "Bad option - filename too long"); | tftp_log(LOG_ERR, "Bad option - filename too long"); | ||||
send_error(peer, EBADOP); | send_error(peer, EBADOP); | ||||
▲ Show 20 Lines • Show All 373 Lines • Show Last 20 Lines |