changeset 6017:9565f0ce6f2e libavformat

matroskadec: Fix buffer overread in matroska_ebmlnum_uint Based on a Chromium patch
author conrad
date Tue, 18 May 2010 21:21:32 +0000
parents ce535a7152ef
children b36bdd7213ea
files matroskadec.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/matroskadec.c	Tue May 18 21:21:28 2010 +0000
+++ b/matroskadec.c	Tue May 18 21:21:32 2010 +0000
@@ -679,7 +679,7 @@
 {
     ByteIOContext pb;
     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);
 }
 
 /*