ref: 1f87c1b747d5477377cdb1f2c82935d5fc6dc87b
parent: 437ef0789c8c0c8ad782874424433c7d5fdbeef9
author: Paul Brossier <piem@piem.org>
date: Sat Apr 30 02:34:06 EDT 2016
python/ext/py-fft.c: check rdo input cvec has correct size
--- a/.travis.yml
+++ b/.travis.yml
@@ -63,7 +63,7 @@
- sox
script:
- - make create_test_sounds
+ - echo make create_test_sounds disabled for now
- make build
- make build_python
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make test_python; fi
--- a/python/ext/py-fft.c
+++ b/python/ext/py-fft.c
@@ -121,6 +121,13 @@
return NULL;
}
+ if (self->cvecin.length != self->win_s / 2 + 1) {
+ PyErr_Format(PyExc_ValueError,
+ "input array has length %d, but fft input has size %d",
+ self->vecin.length, self->win_s / 2 + 1);
+ return NULL;
+ }
+
fvec_t out;
Py_INCREF(self->rdoout);
if (!PyAubio_ArrayToCFvec(self->rdoout, &out) ) {