ffmpeg | branch: master | Michael Niedermayer <mich...@niedermayer.cc> | Fri 
Dec  4 13:43:18 2015 +0100| [2ff61c3c1a0a7d8de741ba37c7662dedb6ad4b60] | 
committer: Michael Niedermayer

avcodec/dnxhddec: Fix runtime error: left shift of negative value

Fixes: 
2abd25478c62a675f335fac00b467023/asan_static-oob_10aff98_1227_8811480c6ef1e970a7977ceb7e5a9958.mxf

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2ff61c3c1a0a7d8de741ba37c7662dedb6ad4b60
---

 libavcodec/dnxhddec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index 20ca262..5c09c64 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -361,7 +361,7 @@ static av_always_inline int dnxhd_decode_dct_block(const 
DNXHDContext *ctx,
         LAST_SKIP_BITS(bs, &row->gb, len);
         sign  = ~level >> 31;
         level = (NEG_USR32(sign ^ level, len) ^ sign) - sign;
-        row->last_dc[component] += level << dc_shift;
+        row->last_dc[component] += level * (1 << dc_shift);
     }
     block[0] = row->last_dc[component];
 

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to