[soc]: r5322 - wmapro/wmaprodec.c
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;
participants (1)
-
faust3