History

python/ext/py-fft.c: check input has correct size

Paul Brossier committed 10 years ago

Commit 6014dc01 parent d03ee4b1 file · +7 −0Browse files

Showing the changes to python/ext (1 of 1 file). Show all

Unified · Split

python/ext/py-fft.c+7−0
@@ -85,6 +85,13 @@ Py_fft_do(Py_fft * self, PyObject * args) · 84 unmodified lines
8585 return NULL;
8686 }
8787
88+ if (self->vecin.length != self->win_s) {
89+ PyErr_Format(PyExc_ValueError,
90+ "input array has length %d, but fft has size %d",
91+ self->vecin.length, self->win_s);
92+ return NULL;
93+ }
94+
8895 cvec_t c_out;
8996 Py_INCREF(self->doout);
9097 if (!PyAubio_PyCvecToCCvec(self->doout, &c_out)) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t