Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

bug fix #200

Open
RayCh001 opened this issue Oct 14, 2022 · 1 comment
Open

bug fix #200

RayCh001 opened this issue Oct 14, 2022 · 1 comment

Comments

@RayCh001
Copy link

tftp.py have 2 bug at line 218 & 223 .
"self.block = block + 1" should be "self.block = block + self.wrap * 65536 + 1"
since block is set by block no from ack message, block will rotate from 1 to 65536(0), then self.block rotate from 1 to 65536(0) too,
finally ,
"self.fh.seek(self.blksize * (self.block - 1))" would not get right position for file its size > 2**16*512(65536)

@icb-
Copy link
Collaborator

icb- commented Oct 15, 2022

tftp.py have 2 bug at line 218 & 223 .
"self.block = block + 1" should be "self.block = block + self.wrap * 65536 + 1"
since block is set by block no from ack message, block will rotate from 1 to 65536(0), then self.block rotate from 1 to 65536(0) too,

Can you submit a PR with a fix?

finally ,
"self.fh.seek(self.blksize * (self.block - 1))" would not get right position for file its size > 2**16*512(65536)

While this may be true, TFTP is unsuitable for a 2 terabyte file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants