aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-12-04 18:53:03 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-12-04 18:54:39 +0100
commitab7ff38052f136c339dbc6a35a7815fbea20f865 (patch)
tree4fd1aa4fb2ebb8ce11b258da0d5b29214cae55ef
parent689a8674131c3852fc78eff1d7c044850d263e22 (diff)
downloadffmpeg-ab7ff38052f136c339dbc6a35a7815fbea20f865.tar.gz
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@niedermayer.cc>
-rw-r--r--libavformat/flvdec.c2
1 files changed, 1 insertions, 1 deletions
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;