[issue32056] Improve exceptions in Lib/wave.py

Serhiy Storchaka report at bugs.python.org
Thu Mar 1 01:10:13 EST 2018


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I have no idea why this was classified as a vulnerability. I don't think it can crash an application. If you have an example of crashing please provide it.

I would not classify this issue even as a bug. It is obvious that invalid files can cause an exception. It may be good to detect some of errors earlier and raise more specific exception (Error would be more appropriate here than ValueError). But in general validating the wave file is not the purpose of this module, and this task can't be performed without reading the whole file, not only the header.

All changes in wave.py should be ported to aifc.py and sunau.py and needs tests.

----------
title: bug in Lib/wave.py -> Improve exceptions in Lib/wave.py
type: crash -> enhancement
versions: +Python 3.8 -Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32056>
_______________________________________


More information about the Python-bugs-list mailing list