[SCM] calf/master: + Organ: add protection against incorrect percussive waveform number or notes outside bandlimit table

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:37:19 UTC 2013


The following commit has been merged in the master branch:
commit 2465b78b6bbb1c08b543435fed5a623b0a4c5d54
Author: kfoltman <kfoltman at 78b06b96-2940-0410-b7fc-879d825d01d8>
Date:   Thu Jun 19 21:29:07 2008 +0000

    + Organ: add protection against incorrect percussive waveform number or notes outside bandlimit table
    
    
    git-svn-id: https://calf.svn.sourceforge.net/svnroot/calf/trunk@206 78b06b96-2940-0410-b7fc-879d825d01d8

diff --git a/src/calf/organ.h b/src/calf/organ.h
index 7a2b3cc..6fc7f4e 100644
--- a/src/calf/organ.h
+++ b/src/calf/organ.h
@@ -274,7 +274,11 @@ public:
         // XXXKF the decay needs work!
         double age_const = parameters->perc_decay_const;
         int timbre = parameters->get_percussion_timbre();
+        if (timbre < 0 || timbre >= (int)(sizeof(wave_ids) / sizeof(wave_ids[0])))
+            return;
         float *data = waves[wave_ids[timbre]].get_level(dphase.get());
+        if (!data)
+            return;
         if (timbre < 3)
         {
             for (int i = 0; i < nsamples; i++) {

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list