summaryrefslogtreecommitdiff
path: root/libavformat/matroskadec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-19 23:38:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-19 23:38:01 +0200
commit729fa55b8f4250b2fee7f4a511372d0b9f696389 (patch)
tree656688e4d618eabeb6b504cd4859c43e9997529b /libavformat/matroskadec.c
parent1a5f1bcff0a63cc3e8273a9e3ccc990be40dc06a (diff)
avformat/matroskadec: fix integer overflow
Fixes fate-mkv with ekopath 4 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 648941e57f..fc3e4f0f88 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2284,7 +2284,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
return res;
av_assert1(block_duration != AV_NOPTS_VALUE);
- block_time = AV_RB16(data);
+ block_time = sign_extend(AV_RB16(data), 16);
data += 2;
flags = *data++;
size -= 3;