From ab7ff38052f136c339dbc6a35a7815fbea20f865 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 4 Dec 2015 18:53:03 +0100 Subject: [PATCH] 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 --- libavformat/flvdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 8465eb57d5..d9bea917d7 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;