projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d03ee4b
)
python/ext/py-fft.c: check input has correct size
author
Paul Brossier
<piem@piem.org>
Sat, 30 Apr 2016 04:20:41 +0000
(06:20 +0200)
committer
Paul Brossier
<piem@piem.org>
Sat, 30 Apr 2016 04:20:41 +0000
(06:20 +0200)
python/ext/py-fft.c
patch
|
blob
|
history
diff --git
a/python/ext/py-fft.c
b/python/ext/py-fft.c
index
93094a4
..
de05ef7
100644
(file)
--- a/
python/ext/py-fft.c
+++ b/
python/ext/py-fft.c
@@
-85,6
+85,13
@@
Py_fft_do(Py_fft * self, PyObject * args)
return NULL;
}
+ if (self->vecin.length != self->win_s) {
+ PyErr_Format(PyExc_ValueError,
+ "input array has length %d, but fft has size %d",
+ self->vecin.length, self->win_s);
+ return NULL;
+ }
+
cvec_t c_out;
Py_INCREF(self->doout);
if (!PyAubio_PyCvecToCCvec(self->doout, &c_out)) {