Commit 43d9c147 authored by conrad's avatar conrad

matroskadec: Fix buffer overread in matroska_ebmlnum_uint

Based on a Chromium patch

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23168 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 000247a6
...@@ -679,7 +679,7 @@ static int matroska_ebmlnum_uint(MatroskaDemuxContext *matroska, ...@@ -679,7 +679,7 @@ static int matroska_ebmlnum_uint(MatroskaDemuxContext *matroska,
{ {
ByteIOContext pb; ByteIOContext pb;
init_put_byte(&pb, data, size, 0, NULL, NULL, NULL, NULL); init_put_byte(&pb, data, size, 0, NULL, NULL, NULL, NULL);
return ebml_read_num(matroska, &pb, 8, num); return ebml_read_num(matroska, &pb, FFMIN(size, 8), num);
} }
/* /*
......
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