mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
Issue #13806: The size check in audioop decompression functions was too strict and could reject valid compressed data.
Patch by Oleg Plakhotnyuk.
This commit is contained in:
parent
1abe6cd842
commit
88c51e8cb1
3 changed files with 25 additions and 9 deletions
|
|
@ -1298,7 +1298,7 @@ audioop_ulaw2lin(PyObject *self, PyObject *args)
|
|||
&cp, &len, &size) )
|
||||
return 0;
|
||||
|
||||
if (!audioop_check_parameters(len, size))
|
||||
if (!audioop_check_size(size))
|
||||
return NULL;
|
||||
|
||||
if (len > INT_MAX/size) {
|
||||
|
|
@ -1367,7 +1367,7 @@ audioop_alaw2lin(PyObject *self, PyObject *args)
|
|||
&cp, &len, &size) )
|
||||
return 0;
|
||||
|
||||
if (!audioop_check_parameters(len, size))
|
||||
if (!audioop_check_size(size))
|
||||
return NULL;
|
||||
|
||||
if (len > INT_MAX/size) {
|
||||
|
|
@ -1509,7 +1509,7 @@ audioop_adpcm2lin(PyObject *self, PyObject *args)
|
|||
&cp, &len, &size, &state) )
|
||||
return 0;
|
||||
|
||||
if (!audioop_check_parameters(len, size))
|
||||
if (!audioop_check_size(size))
|
||||
return NULL;
|
||||
|
||||
/* Decode state, should have (value, step) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue