Author serhiy.storchaka
Recipients BT123, ned.deily, serhiy.storchaka
Date 2018-03-18.09:16:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1521364614.78.0.467229070634.issue32056@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2018-03-18 09:16:54serhiy.storchakasetrecipients: + serhiy.storchaka, ned.deily, BT123
2018-03-18 09:16:54serhiy.storchakasetmessageid: <1521364614.78.0.467229070634.issue32056@psf.upfronthosting.co.za>
2018-03-18 09:16:54serhiy.storchakalinkissue32056 messages
2018-03-18 09:16:54serhiy.storchakacreate