diff mbox

[FFmpeg-devel,2/3] avformat/oggparseogm: Fix undefined shift in ogm_packet()

Message ID 20180309013754.24682-2-michael@niedermayer.cc
State Accepted
Commit 010b7b30b721b90993e05e9ee6338e88bb8debb3
Headers show

Commit Message

Michael Niedermayer March 9, 2018, 1:37 a.m. UTC
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>
---
 libavformat/oggparseogm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer March 10, 2018, 12:21 a.m. UTC | #1
On Fri, Mar 09, 2018 at 02:37:53AM +0100, Michael Niedermayer wrote:
> 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>
> ---
>  libavformat/oggparseogm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied

[...]
diff mbox

Patch

diff --git a/libavformat/oggparseogm.c b/libavformat/oggparseogm.c
index ca6b62669d..4b4edf26ca 100644
--- a/libavformat/oggparseogm.c
+++ b/libavformat/oggparseogm.c
@@ -180,7 +180,7 @@  ogm_packet(AVFormatContext *s, int idx)
     os->psize -= lb + 1;
 
     while (lb--)
-        os->pduration += p[lb+1] << (lb*8);
+        os->pduration += (uint64_t)p[lb+1] << (lb*8);
 
     return 0;
 }