[FFmpeg-devel] [PATCH] avidec: avoid infinite loop due to negative ast->sample_size

Michael Niedermayer michaelni at gmx.at
Tue May 5 00:04:18 CEST 2015

On Mon, May 04, 2015 at 11:01:45PM +0200, Andreas Cadhalpun wrote:
> If max in clean_index is set to a negative ast->sample_size, the
> following loop never ends:
>         while (max < 1024)
>             max += max;
> Thus set ast->sample_size to 0 if it would otherwise be negative.
> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> ---
>  libavformat/avidec.c | 1 +
>  1 file changed, 1 insertion(+)


added a warning message for this case too


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150505/bd37fb53/attachment.asc>

More information about the ffmpeg-devel mailing list