diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-01-28 22:01:59 +0100 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-01-28 22:01:59 +0100 |
commit | 75ff65ef963e7127cdb02d48cf0d1fea352a00da (patch) | |
tree | 5a6de16d28d7c1b241ae78f99a03e10b0eb0ee9c /Modules/audioop.c | |
parent | eba63c4203322af73fd2a926bd20edc495717577 (diff) | |
download | cpython-git-75ff65ef963e7127cdb02d48cf0d1fea352a00da.tar.gz |
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/audioop.c')
-rw-r--r-- | Modules/audioop.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/audioop.c b/Modules/audioop.c index a031d42b0f..9ab4834e29 100644 --- a/Modules/audioop.c +++ b/Modules/audioop.c @@ -1313,7 +1313,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 > PY_SSIZE_T_MAX/size) { @@ -1382,7 +1382,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 > PY_SSIZE_T_MAX/size) { @@ -1527,7 +1527,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) */ |