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
bz2.BZ2DEcompressor.decompress fail on large files #58606
Comments
The call ends with: sys.version: |
I can't reproduce this. Can you please provide a test script along with input data that allows us to reproduce this error? |
Wow! Quick follow-up. The data file is about 1.6Gb. Is there a preferred way to pass it on (I suspect that the bug tracker is not the preferred way). The code goes like: import bz2
f = file("foobar.bz2", mode="rb")
src_buf = f.read()
decomp = bz2.BZ2Decompressor()
tmp = decomp.decompress(src_buf) |
I have been able to reproduce it; see attached script. It happens for It seems that bz2module.c doesn't guard against 32-bit overflows when |
(the contents of the input file don't matter; I just pulled out a |
This should be fixed for 2.7.3. I'll have a patch ready in the next day |
This isn't a regression, is it? If it's not, I don't think it's essential to get into 2.7.3. |
No, it's been around since at least 2.6. I wasn't really sure what the |
Nadeem: the final release candidate of 2.7.3 was already made. Any further change would require another release candidate, which in turn would delay the release further. This has to wait for 2.7.4. |
That's fine by me, then. Sorry for the confusion. |
New changeset ebb8c7d79f52 by Nadeem Vawda in branch '3.2': New changeset 25fdf297c077 by Nadeem Vawda in branch '3.3': New changeset d6bf506ea13f by Nadeem Vawda in branch 'default': |
What about 2.7? |
I'm working on it now. Will push in the next 15 minutes or so. |
New changeset f03a335621ce by Nadeem Vawda in branch '2.7': |
All fixed, along with some other similar but harder-to-trigger bugs. Thanks for the bug report, Laurent! |
Why does only 2.7 have tests? |
An oversight on my part, I think. I'll add tests for 3.x this weekend. |
Hmm, so actually most of the bugs fixed in 2.7 and 3.2 weren't present As for the changes that I did make to 3.3/3.4:
|
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: