mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #28275: Fixed possible use adter free in LZMADecompressor.decompress().
Original patch by John Leitch.
This commit is contained in:
commit
a12e7842a5
3 changed files with 15 additions and 1 deletions
|
@ -995,8 +995,10 @@ decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length)
|
|||
}
|
||||
|
||||
result = decompress_buf(d, max_length);
|
||||
if(result == NULL)
|
||||
if (result == NULL) {
|
||||
lzs->next_in = NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (d->eof) {
|
||||
d->needs_input = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue