diff matroskadec.c @ 6381:8678cbf178d7 libavformat

matroskadec: fix integer overflow patch from reimar
author aurel
date Tue, 17 Aug 2010 14:05:23 +0000
parents b7a16d6df72a
children a4e249f79b66
line wrap: on
line diff
--- a/matroskadec.c	Mon Aug 16 14:23:35 2010 +0000
+++ b/matroskadec.c	Tue Aug 17 14:05:23 2010 +0000
@@ -901,6 +901,9 @@
     int result = 0;
     int olen;
 
+    if (pkt_size >= 10000000)
+        return -1;
+
     switch (encodings[0].compression.algo) {
     case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
         return encodings[0].compression.settings.size;