projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c85c15
)
[dct] fail ooura creation if size <= 0
author
Paul Brossier
<piem@piem.org>
Mon, 26 Nov 2018 15:29:42 +0000
(16:29 +0100)
committer
Paul Brossier
<piem@piem.org>
Mon, 26 Nov 2018 15:29:42 +0000
(16:29 +0100)
src/spectral/dct_ooura.c
patch
|
blob
|
history
diff --git
a/src/spectral/dct_ooura.c
b/src/spectral/dct_ooura.c
index
adfc452
..
ba6a64b
100644
(file)
--- a/
src/spectral/dct_ooura.c
+++ b/
src/spectral/dct_ooura.c
@@
-38,8
+38,8
@@
struct _aubio_dct_ooura_t {
aubio_dct_ooura_t * new_aubio_dct_ooura (uint_t size) {
aubio_dct_ooura_t * s = AUBIO_NEW(aubio_dct_ooura_t);
- if (aubio_is_power_of_two(size) != 1) {
- AUBIO_ERR("dct: can only create with sizes power of two, requested %d\n",
+ if (aubio_is_power_of_two(size) != 1
|| (sint_t)size <= 0
) {
+ AUBIO_ERR("dct
_ooura
: can only create with sizes power of two, requested %d\n",
size);
goto beach;
}