[FFmpeg-cvslog] nutdec: fix integer overflow

Michael Niedermayer git at videolan.org
Sat Oct 20 22:10:32 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 20 20:45:32 2012 +0200| [73581afe01b41d0028afb6b14f5493568cf1be3d] | committer: Michael Niedermayer

nutdec: fix integer overflow

Fixes CID700575
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/nutdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 492d5c8..1ba79eb 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -789,7 +789,7 @@ static int decode_frame_header(NUTContext *nut, int64_t *pts, int *stream_id,
         if (coded_pts < (1 << stc->msb_pts_shift)) {
             *pts = ff_lsb2full(stc, coded_pts);
         } else
-            *pts = coded_pts - (1 << stc->msb_pts_shift);
+            *pts = coded_pts - (1LL << stc->msb_pts_shift);
     } else
         *pts = stc->last_pts + pts_delta;
     if (flags & FLAG_SIZE_MSB)



More information about the ffmpeg-cvslog mailing list