projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5c3061e
)
[dct] fail fftw creation if size <= 0
author
Paul Brossier
<piem@piem.org>
Mon, 26 Nov 2018 15:59:56 +0000
(16:59 +0100)
committer
Paul Brossier
<piem@piem.org>
Mon, 26 Nov 2018 15:59:56 +0000
(16:59 +0100)
src/spectral/dct_fftw.c
patch
|
blob
|
history
diff --git
a/src/spectral/dct_fftw.c
b/src/spectral/dct_fftw.c
index
2a4fa7a
..
7d6c32c
100644
(file)
--- a/
src/spectral/dct_fftw.c
+++ b/
src/spectral/dct_fftw.c
@@
-63,7
+63,9
@@
struct _aubio_dct_fftw_t {
aubio_dct_fftw_t * new_aubio_dct_fftw (uint_t size) {
aubio_dct_fftw_t * s = AUBIO_NEW(aubio_dct_fftw_t);
aubio_dct_fftw_t * new_aubio_dct_fftw (uint_t size) {
aubio_dct_fftw_t * s = AUBIO_NEW(aubio_dct_fftw_t);
- if (!s) {
+ if ((sint_t)size <= 0) {
+ AUBIO_ERR("dct_fftw: can only create with size > 0, requested %d\n",
+ size);
goto beach;
}
s->size = size;
goto beach;
}
s->size = size;