GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-160000: Fix LZMADecompressor raising on repeated empty decompress calls by bunnysayzz · Pull Request #160205 · python/cpython Conversation
|
|
The following commit authors need to sign the Contributor License Agreement: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| lzd = LZMADecompressor() | ||
| for _ in range(3): | ||
| self.assertEqual(lzd.decompress(b'', max_length=0), b'') | ||
| # Same after real input: one byte out, then empty calls, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think this can be split into separate tests or parameterized in some way.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (lzret == LZMA_BUF_ERROR && | ||
| (lzs->avail_in == 0 || lzs->avail_out == 0)) { | ||
| lzret = LZMA_OK; /* That wasn't a real error */ |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Rather than ignoring the error, we should add the input bytes to the input buffer, then return empty bytes without calling the library.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Fix :class:`lzma.LZMADecompressor` raising :exc:`LZMAError` on repeated | ||
| ``decompress(b'', max_length=0)`` calls. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| Fix :class:`lzma.LZMADecompressor` raising :exc:`LZMAError` on repeated | |
| ``decompress(b'', max_length=0)`` calls. | |
| Fix :class:`lzma.LZMADecompressor` raising :exc:`LZMAError` on repeated | |
| ``decompress()`` calls with ``max_length=0``. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@bunnysayzz if you resolve the review comments, I'd be happy to take another look at this. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
LZMADecompressor.decompress(b'', max_length=0) raises LZMAError on the second consecutive call
There was an error while loading. Please reload this page.