Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

Now open() in modules aifc, sunau and wave will raise only EOFError (if the 
file was truncated) or corresponding module error exception on corrupted files. 
aifc.open() can raise also OverflowError, but this is a different issue32978. 
And of course OSError, MemoryError, RecursionError and KeyboardInterrupt can be 
raised for causes not related to the correctness of the file.

I withdraw the part of my claim in msg313084. I have tested -- backporting this 
is safe, because some error always was raised in open(). But it can help 
existing user code which was not aware about wider set of exceptions (like in 
the original report). It can work in common case, and handle most corrupted 
files well, but fail in cases of specially created malicious data. Thus I think 
it is worth to backport this change at least to 3.7. What are your thoughts Ned?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32056>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to