Commit 2f8c8163 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8750aef3
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment