forked from mirrors/tftp-hpa-google
(Finally) handle block number wraparound correctly.
This commit is contained in:
parent
52ffc49262
commit
480bee14e9
3 changed files with 14 additions and 5 deletions
|
@ -104,7 +104,8 @@ tftp_sendfile(int fd, char *name, char *mode)
|
|||
struct tftphdr *ap; /* data and ack packets */
|
||||
struct tftphdr *dp;
|
||||
int n;
|
||||
volatile int block, size, convert;
|
||||
volatile u_short block;
|
||||
volatile int size, convert;
|
||||
volatile unsigned long amount;
|
||||
struct sockaddr_in from;
|
||||
int fromlen;
|
||||
|
@ -206,7 +207,8 @@ tftp_recvfile(int fd, char *name, char *mode)
|
|||
struct tftphdr *ap;
|
||||
struct tftphdr *dp;
|
||||
int n;
|
||||
volatile int block, size, firsttrip;
|
||||
volatile u_short block;
|
||||
volatile int size, firsttrip;
|
||||
volatile unsigned long amount;
|
||||
struct sockaddr_in from;
|
||||
int fromlen;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue