diff options
author | Chris Robinson <[email protected]> | 2012-10-05 00:27:29 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-10-05 00:27:29 -0700 |
commit | 0b47844606943931803f8d4f6ffae48b9487f238 (patch) | |
tree | b6e58a5c6c5483dd5a3494b92dd7a1fb75364856 /Alc/mixer.c | |
parent | 468759e6abe90c0a6c8e2b445eb54275d7571265 (diff) |
Fix potential buffer overflow with temp sample space
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r-- | Alc/mixer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c index 4658b33b..7671f1b3 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -157,8 +157,9 @@ ALvoid MixSource(ALsource *Source, ALCdevice *Device, ALuint SamplesToDo) for(chan = 0;chan < NumChannels;chan++) { - ALIGN(16) ALfloat SrcData[BUFFERSIZE]; - ALIGN(16) ALfloat ResampledData[BUFFERSIZE]; + /* +1 for the predictive sample. */ + ALIGN(16) ALfloat SrcData[BUFFERSIZE+1]; + ALIGN(16) ALfloat ResampledData[BUFFERSIZE+1]; ALuint SrcDataSize = 0; if(Source->SourceType == AL_STATIC) |