diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2016-09-27 17:24:19 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-09-27 17:24:19 (GMT) |
| commit | be43f2019fd5c56cdf9ca337ed23c1ef4dc9af38 (patch) | |
| tree | 6a00762f3a35466ead9346402b7db0894ffd9ad7 /Modules | |
| parent | c019158a4c7a7b79a7d2d4f1de87c8789a5ec13d (diff) | |
| parent | a12e7842a5f572afd6bde108f24931f9262f38ef (diff) | |
| download | cpython-be43f2019fd5c56cdf9ca337ed23c1ef4dc9af38.zip cpython-be43f2019fd5c56cdf9ca337ed23c1ef4dc9af38.tar.gz cpython-be43f2019fd5c56cdf9ca337ed23c1ef4dc9af38.tar.bz2 | |
Issue #28275: Fixed possible use adter free in LZMADecompressor.decompress().
Original patch by John Leitch.
Diffstat (limited to 'Modules')
| -rw-r--r-- | Modules/_lzmamodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_lzmamodule.c b/Modules/_lzmamodule.c index 5e158fd..f5dcea1 100644 --- a/Modules/_lzmamodule.c +++ b/Modules/_lzmamodule.c @@ -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; |
