[FFmpeg-devel] [patch] infinite loop

Michael Niedermayer michaelni at gmx.at
Wed Jan 4 04:58:04 CET 2012


On Tue, Jan 03, 2012 at 10:26:53PM -0500, Philippe Saint-Pierre wrote:
> Hi,
> 
> I noticed an infinite loop in libavcodec/alsdec.c (zero_remaining())
> 
> Here is patch attached.
> 
> --
> Philippe Saint-Pierre

> --- libavcodec/alsdec.c~	2012-01-03 22:22:16.642164621 -0500
> +++ libavcodec/alsdec.c	2012-01-03 22:22:19.950164532 -0500
> @@ -1009,13 +1009,13 @@
>  static void zero_remaining(unsigned int b, unsigned int b_max,
>                             const unsigned int *div_blocks, int32_t *buf)
>  {
>      unsigned int count = 0;
>  
>      while (b < b_max)
> -        count += div_blocks[b];
> +        count += div_blocks[b++];
>  
>      if (count)
>          memset(buf, 0, sizeof(*buf) * count);
>  }

its clear the in git code is wrong and this may be the correct
solution ...

thilo can you take a look ?



[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120104/b359e4e3/attachment.asc>


More information about the ffmpeg-devel mailing list