avformat/oggparseogm: Fix undefined shift in ogm_packet()
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 8 Mar 2018 22:14:04 +0000 (23:14 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 9 Jul 2018 23:18:52 +0000 (01:18 +0200)
Fixes: shift exponent 48 is too large for 32-bit type 'int'
Fixes: Chromium bug 786793
Reported-by: Matt Wolenetz <wolenetz@google.com>
Reviewed-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 010b7b30b721b90993e05e9ee6338e88bb8debb3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/oggparseogm.c

index ae8c3c8..f03deda 100644 (file)
@@ -174,7 +174,7 @@ ogm_packet(AVFormatContext *s, int idx)
     os->psize -= lb + 1;
 
     while (lb--)
     os->psize -= lb + 1;
 
     while (lb--)
-        os->pduration += p[lb+1] << (lb*8);
+        os->pduration += (uint64_t)p[lb+1] << (lb*8);
 
     return 0;
 }
 
     return 0;
 }