[FFmpeg-cvslog] r17311 - trunk/libavcodec/resample.c
pross
subversion
Sun Feb 15 07:29:43 CET 2009
Author: pross
Date: Sun Feb 15 07:29:43 2009
New Revision: 17311
Log:
Prevent heap corruption when resampling 8-bit audio.
Modified:
trunk/libavcodec/resample.c
Modified: trunk/libavcodec/resample.c
==============================================================================
--- trunk/libavcodec/resample.c Sun Feb 15 03:36:43 2009 (r17310)
+++ trunk/libavcodec/resample.c Sun Feb 15 07:29:43 2009 (r17311)
@@ -251,7 +251,7 @@ int audio_resample(ReSampleContext *s, s
int ostride[1] = { 2 };
const void *ibuf[1] = { input };
void *obuf[1];
- unsigned input_size = nb_samples*s->input_channels*s->sample_size[0];
+ unsigned input_size = nb_samples*s->input_channels*2;
if (!s->buffer_size[0] || s->buffer_size[0] < input_size) {
av_free(s->buffer[0]);
More information about the ffmpeg-cvslog
mailing list