From afb7863891c7817a5a1e4b9a98a1e09dd7aa2a32 Mon Sep 17 00:00:00 2001 From: Gerald Date: Fri, 25 Nov 2016 16:16:56 +0100 Subject: [PATCH] Fixed #96 internal buffer overflow --- src/jack.cxx | 9 ++++++--- src/jack.hxx | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/jack.cxx b/src/jack.cxx index 23a010d..b6551d3 100644 --- a/src/jack.cxx +++ b/src/jack.cxx @@ -84,7 +84,7 @@ Jack::Jack( std::string name ) : clientActive(false) { jack = this; - + lastnframes=0; samplerate = jack_get_sample_rate( client ); LUPPP_NOTE("Samplerate %i", samplerate ); @@ -494,7 +494,7 @@ void Jack::processFrames(int nframes) metronome->process( nframes, &buffers ); /// mix input, reverb & post-sidechain in - for(unsigned int i = 0; i < buffers.nframes; i++) + for(unsigned int i = 0; i < nframes; i++) { float input= buffers.audio[Buffers::MASTER_INPUT][i] * inputVol; @@ -574,8 +574,9 @@ void Jack::processFrames(int nframes) // JACK in multiple parts internally in Luppp: used for processing bar() / beat() // if a full JACK nframes has been processed, this is extra work: its not that expensive /// update buffers by nframes - if(nframes