Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack update of read_end_offset in shift_file (tcpip.cpp) #247

Open
aasselin opened this issue Jul 5, 2022 · 0 comments
Open

Lack update of read_end_offset in shift_file (tcpip.cpp) #247

aasselin opened this issue Jul 5, 2022 · 0 comments

Comments

@aasselin
Copy link

aasselin commented Jul 5, 2022

at

bytes_to_move -= bytes_this_time;

there should be an additional line:
read_end_offset -= bytes_this_time;

the code won't work if the existing data in the file is longer than buffer size

(the SO post referenced near the shift_file function was updated with a comment)
Regards

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

No branches or pull requests

1 participant