Skip to content
Snippets Groups Projects
Commit 97957236 authored by Ganesh Ajjanagadde's avatar Ganesh Ajjanagadde Committed by Michael Niedermayer
Browse files

avcodec/ac3enc: fix undefined negative left shift

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: default avatarGanesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent c4e23ca8
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment