diff mbox

[FFmpeg-devel,v2,12/15] avcodec/ituh263dec: Fix undefined left shift of negative number

Message ID 20190928022610.5903-12-andreas.rheinhardt@gmail.com
State Accepted
Commit 324487b596fbcda0a5753c7bb7b2e96e9d512479
Headers show

Commit Message

Andreas Rheinhardt Sept. 28, 2019, 2:26 a.m. UTC
Fixes ticket #8160.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/ituh263dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Sept. 28, 2019, 3:36 p.m. UTC | #1
On Sat, Sep 28, 2019 at 04:26:07AM +0200, Andreas Rheinhardt wrote:
> Fixes ticket #8160.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavcodec/ituh263dec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

thx

[...]
diff mbox

Patch

diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index 1b57e53cad..afc786bd8b 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -1281,7 +1281,7 @@  int ff_h263_decode_picture_header(MpegEncContext *s)
         for(i=0; i<13; i++){
             for(j=0; j<3; j++){
                 int v= get_bits(&s->gb, 8);
-                v |= get_sbits(&s->gb, 8)<<8;
+                v |= get_sbits(&s->gb, 8) * (1 << 8);
                 av_log(s->avctx, AV_LOG_DEBUG, " %5d", v);
             }
             av_log(s->avctx, AV_LOG_DEBUG, "\n");