summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-01-28 21:01:59 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-01-28 21:01:59 (GMT)
commit88c51e8cb12002404b9b1050831bf317a786d6e9 (patch)
tree9aa85fdae032afa049a23b3be9b16492ba8aa029 /Modules
parent1abe6cd84245322883982cb7c5e3f9d754ea3171 (diff)
downloadcpython-88c51e8cb12002404b9b1050831bf317a786d6e9.zip
cpython-88c51e8cb12002404b9b1050831bf317a786d6e9.tar.gz
cpython-88c51e8cb12002404b9b1050831bf317a786d6e9.tar.bz2
Issue #13806: The size check in audioop decompression functions was too strict and could reject valid compressed data.
Patch by Oleg Plakhotnyuk.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/audioop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/audioop.c b/Modules/audioop.c
index fb69ed3..fc79cf5 100644
--- a/Modules/audioop.c
+++ b/Modules/audioop.c
@@ -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) */