]> git.sesse.net Git - ffmpeg/commit
avidec: avoid infinite loop due to negative ast->sample_size
authorAndreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Mon, 4 May 2015 21:01:45 +0000 (23:01 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 4 May 2015 22:04:38 +0000 (00:04 +0200)
commitca234639ac49a0dc073ac1f10977979acdb94f97
treeb88a0a832c0f210ef0cff94fb5f4bcff2563aff2
parent079b7f6eacc09bc2813fc1ddc230ab05022b69c2
avidec: avoid infinite loop due to negative ast->sample_size

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@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/avidec.c