aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-10-05 00:27:29 -0700
committerChris Robinson <[email protected]>2012-10-05 00:27:29 -0700
commit0b47844606943931803f8d4f6ffae48b9487f238 (patch)
treeb6e58a5c6c5483dd5a3494b92dd7a1fb75364856 /Alc/mixer.c
parent468759e6abe90c0a6c8e2b445eb54275d7571265 (diff)
Fix potential buffer overflow with temp sample space
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r--Alc/mixer.c5
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)