Files
micropython/tests/extmod/deflate_compress_memory_error.py.exp
Damien George fa42487e45 extmod/moddeflate: Keep DeflateIO state consistent on window alloc fail.
Allocation of a large compression window may fail, and in that case keep
the `DeflateIO` state consistent so its other methods (such as `close()`)
still work.  Consistency is kept by only updating the `self->write` member
if the window allocation succeeds.

Thanks to @jimmo for finding the bug.

Signed-off-by: Damien George <damien@micropython.org>
2025-03-27 11:58:59 +11:00

3 lines
16 B
Plaintext