Bug#695593: [libav-devel] [PATCH] wmadec: avoid an infinitive loop
Reinhard Tartler
siretart at gmail.com
Mon May 20 14:01:43 UTC 2013
Note that Justin claims that the issue has already been fixed in
Commit: ea1136baafb1fe271cb56c3f4d7bff0267e3c70f, but having some else
eyeballing wouldn't hurt, I guess.
I'm happy to drop the patch if this is a no-issue by now, btw.
Cheers,
Reinhard
On Mon, May 20, 2013 at 3:50 PM, <siretart at gmail.com> wrote:
> From: Laurent Bigonville <bigon at debian.org>
>
> In some situations, transcoding a wmav2 file can lead to a infinite loop
> (which is leaking a lot of memory).
>
> CC: libav-stable at libav.org
> ---
> libavcodec/wmadec.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> For full context of this patch, please
> cf. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=695593 and
> http://avcodec.org/trac/ffmpeg/ticket/286.
>
> Cheers,
> Reinhard
>
> diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
> index b9b176e..5d0aac7 100644
> --- a/libavcodec/wmadec.c
> +++ b/libavcodec/wmadec.c
> @@ -812,7 +812,8 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data,
> buf_size, avctx->block_align);
> return AVERROR_INVALIDDATA;
> }
> - buf_size = avctx->block_align;
> + if(avctx->block_align)
> + buf_size = avctx->block_align;
>
> init_get_bits(&s->gb, buf, buf_size*8);
>
> @@ -911,7 +912,7 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data,
>
> *got_frame_ptr = 1;
>
> - return avctx->block_align;
> + return buf_size;
> fail:
> /* when error, we reset the bit reservoir */
> s->last_superframe_len = 0;
> --
> 1.8.1.2
>
> _______________________________________________
> libav-devel mailing list
> libav-devel at libav.org
> https://lists.libav.org/mailman/listinfo/libav-devel
--
regards,
Reinhard
More information about the pkg-multimedia-maintainers
mailing list