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

[3.9] bpo-44439: BZ2File.write()/LZMAFile.write() handle length correctly #26846

Merged
merged 1 commit into from Jun 22, 2021
Merged

Conversation

ghost
Copy link

@ghost ghost commented Jun 22, 2021

No longer use len() to get the length of the input data. For some buffer protocol objects, the length obtained by using len() is wrong.

Co-authored-by: Marco Ribeiro marcoffee@users.noreply.github.com

backport of #26764

Marco Ribeiro reported and provided the fix in https://github.com/animalize/pyzstd/issues/4, so I list him as a co-author.

https://bugs.python.org/issue44439

No longer use len() to get the length of the input data. For some buffer protocol objects, the length obtained by using len() is wrong.

Co-authored-by: Marco Ribeiro <marcoffee@users.noreply.github.com>
@ghost ghost changed the title [3.9] BZ2File.write()/LZMAFile.write() handle length correctly [3.9] bpo-44439: BZ2File.write()/LZMAFile.write() handle length correctly Jun 22, 2021
@serhiy-storchaka serhiy-storchaka merged commit 8bc26d8 into python:3.9 Jun 22, 2021
@ghost ghost deleted the len_3.9 branch June 22, 2021 14:37
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

Successfully merging this pull request may close these issues.

4 participants