aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2012-04-26 15:49:52 -0700
committerH. Peter Anvin <hpa@zytor.com>2012-04-26 15:49:52 -0700
commit81d9a7d9eded5ac6f221020a1838d70107cb53e6 (patch)
tree1c01b581ab86528482f9f4ddbbc2d383efb57800 /core
parenteba2e602f0a8627a3420f73eed96be6aafd422e6 (diff)
downloadsyslinux-81d9a7d9eded5ac6f221020a1838d70107cb53e6.tar.gz
syslinux-81d9a7d9eded5ac6f221020a1838d70107cb53e6.tar.xz
syslinux-81d9a7d9eded5ac6f221020a1838d70107cb53e6.zip
pxe, tftp: Handle block number wraparound
Variables which hold TFTP block numbers must be uint16_t, or they will not wrap around properly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core')
-rw-r--r--core/fs/pxe/tftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fs/pxe/tftp.c b/core/fs/pxe/tftp.c
index 2710787d..429e8ffe 100644
--- a/core/fs/pxe/tftp.c
+++ b/core/fs/pxe/tftp.c
@@ -128,7 +128,7 @@ static void ack_packet(struct inode *inode, uint16_t ack_num)
*/
static void tftp_get_packet(struct inode *inode)
{
- int last_pkt;
+ uint16_t last_pkt;
const uint8_t *timeout_ptr;
uint8_t timeout;
uint16_t buffersize;