[FFmpeg-cvslog] avformat/flvdec: Fix left shift of 137 by 24 places cannot be represented in type int

Michael Niedermayer git at videolan.org
Fri Dec 4 19:09:42 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Dec  4 18:53:03 2015 +0100| [ab7ff38052f136c339dbc6a35a7815fbea20f865] | committer: Michael Niedermayer

avformat/flvdec: Fix left shift of 137 by 24 places cannot be represented in type int

Fixes: 3c857d4d90365731524716e6d051e43a/signal_sigsegv_7f4f59bcc29e_1386_20abd2c8e655cb9c75b24368e65fe3b1.flv

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

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

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

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 8465eb5..d9bea91 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -858,7 +858,7 @@ retry:
         orig_size =
         size = avio_rb24(s->pb);
         dts  = avio_rb24(s->pb);
-        dts |= avio_r8(s->pb) << 24;
+        dts |= (unsigned)avio_r8(s->pb) << 24;
         av_log(s, AV_LOG_TRACE, "type:%d, size:%d, last:%d, dts:%"PRId64" pos:%"PRId64"\n", type, size, last, dts, avio_tell(s->pb));
         if (avio_feof(s->pb))
             return AVERROR_EOF;



More information about the ffmpeg-cvslog mailing list