shithub: aubio

Download patch

ref: 4d6024fc990a6e5407595c0dcc63d53994408ea9
parent: fdeba11f925b0f64e70d800179c184f876c42037
author: Paul Brossier <piem@piem.org>
date: Sat Jan 31 07:15:33 EST 2015

src/io/sink_wavwrite.c: fail if samplerate is way too large

--- a/src/io/sink_wavwrite.c
+++ b/src/io/sink_wavwrite.c
@@ -101,6 +101,8 @@
   if ((sint_t)samplerate < 0) goto beach;
   // zero samplerate given. do not open yet
   if ((sint_t)samplerate == 0) return s;
+  // samplerate way too large, fail
+  if ((sint_t)samplerate > 192000 * 4) goto beach;
 
   s->samplerate = samplerate;
   s->channels = 1;