mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-04 01:51:06 +00:00
Dereferencing NULL in fluid_synth_process, fix #143
This commit is contained in:
parent
02106b9118
commit
905d9e9d26
1 changed files with 6 additions and 0 deletions
|
@ -2544,6 +2544,12 @@ fluid_synth_process(fluid_synth_t* synth, int len, int nin, float** in,
|
|||
int i;
|
||||
left = FLUID_ARRAY(float*, nout/2);
|
||||
right = FLUID_ARRAY(float*, nout/2);
|
||||
if ((left == NULL) || (right == NULL)) {
|
||||
FLUID_LOG(FLUID_ERR, "Out of memory.");
|
||||
FLUID_FREE(left);
|
||||
FLUID_FREE(right);
|
||||
return FLUID_FAILED;
|
||||
}
|
||||
for(i=0; i<nout/2; i++) {
|
||||
left[i] = out[2*i];
|
||||
right[i] = out[2*i+1];
|
||||
|
|
Loading…
Reference in a new issue