summaryrefslogtreecommitdiff
path: root/libavformat/matroskadec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-07-01 11:59:57 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-07-01 12:00:43 +0200
commit2f8c81637c47a70b8e06e1bb9877d6f9c058ee2a (patch)
treecd8e9e3ef974da79a83377ef5a656bd7b0bc41dd /libavformat/matroskadec.c
parent8750aef3d65c0d52946a9b52eba5f5203280b548 (diff)
avformat/matroskadec: Fix undefined shift in read_sint()
Fixes: asan_heap-oob_17212bc_2243_cov_594210248_h264_TTA.mkv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r--libavformat/matroskadec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 07f4539723..9247a75885 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -806,7 +806,7 @@ static int ebml_read_sint(AVIOContext *pb, int size, int64_t *num)
/* big-endian ordering; build up number */
while (n++ < size)
- *num = (*num << 8) | avio_r8(pb);
+ *num = ((uint64_t)*num << 8) | avio_r8(pb);
}
return 0;