[FFmpeg-soc] [soc]: r5322 - wmapro/wmaprodec.c
faust3
subversion at mplayerhq.hu
Wed Aug 26 22:49:34 CEST 2009
Author: faust3
Date: Wed Aug 26 22:49:34 2009
New Revision: 5322
Log:
reduce probability of an integer overflow when checking the output buffer size
Modified:
wmapro/wmaprodec.c
Modified: wmapro/wmaprodec.c
==============================================================================
--- wmapro/wmaprodec.c Wed Aug 26 22:41:04 2009 (r5321)
+++ wmapro/wmaprodec.c Wed Aug 26 22:49:34 2009 (r5322)
@@ -1272,7 +1272,7 @@ static int decode_frame(WMA3DecodeContex
int i;
/** check for potential output buffer overflow */
- if (s->samples + s->num_channels * s->samples_per_frame > s->samples_end) {
+ if (s->num_channels * s->samples_per_frame > s->samples_end - s->samples) {
av_log(s->avctx,AV_LOG_ERROR,
"not enough space for the output samples\n");
s->packet_loss = 1;
More information about the FFmpeg-soc
mailing list