History

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

Paul Brossier committed 10 years ago

Commit 1f87c1b1 parent 437ef072 files · +8 −1Browse files

Showing the changes to python (1 of 2 files). Show all

Unified · Split

python/ext/py-fft.c+7−0
@@ -121,6 +121,13 @@ Py_fft_rdo(Py_fft * self, PyObject * args) · 120 unmodified lines
121121 return NULL;
122122 }
123123
124+ if (self->cvecin.length != self->win_s / 2 + 1) {
125+ PyErr_Format(PyExc_ValueError,
126+ "input array has length %d, but fft input has size %d",
127+ self->vecin.length, self->win_s / 2 + 1);
128+ return NULL;
129+ }
130+
124131 fvec_t out;
125132 Py_INCREF(self->rdoout);
126133 if (!PyAubio_ArrayToCFvec(self->rdoout, &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