[FFmpeg-devel] [PATCH] avcodec/ac3enc: fix undefined negative left shift

Michael Niedermayer michael at niedermayer.cc
Sat Oct 10 15:35:23 CEST 2015

On Fri, Oct 09, 2015 at 03:59:04PM -0400, Ganesh Ajjanagadde wrote:
> This should fix the undefined behavior reported in:
> https://trac.ffmpeg.org/ticket/4727.
> I can reproduce this at runtime: simply stick in an abort call in
> asym_quant to check if c < 0 and run FATE. I don't know ac3 so I can't
> confirm if negative coefficients are intentional, but at the moment they
> clearly are according to FATE.
> This resolves the undefined behavior. Tested with FATE.
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
>  libavcodec/ac3enc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)



Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151010/0bf464c0/attachment.sig>

More information about the ffmpeg-devel mailing list