[syslinux:lwip] pxe, tftp: Handle block number wraparound

syslinux-bot for H. Peter Anvin hpa at zytor.com
Thu Apr 26 15:51:02 PDT 2012


Commit-ID:  81d9a7d9eded5ac6f221020a1838d70107cb53e6
Gitweb:     http://www.syslinux.org/commit/81d9a7d9eded5ac6f221020a1838d70107cb53e6
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Thu, 26 Apr 2012 15:49:52 -0700
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Thu, 26 Apr 2012 15:49:52 -0700

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 at zytor.com>

---
 core/fs/pxe/tftp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/core/fs/pxe/tftp.c b/core/fs/pxe/tftp.c
index 2710787..429e8ff 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;


More information about the Syslinux-commits mailing list