Commit 6e0f74e7 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

contrib: fix eof not detected when looking for an ID size

do use the data in memory that wasn't actually read

Close #14783
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent fbcd354f
--- libebml/src/EbmlElement.cpp 2015-08-21 12:58:03.738589700 +0200
+++ libebml/src/EbmlElement.cpp.eof 2015-08-21 12:55:18.972736500 +0200
@@ -417,7 +417,10 @@
bFound = false;
break;
}
- ReadSize += DataStream.read(&PossibleIdNSize[SizeIdx++], 1);
+ if( DataStream.read( &PossibleIdNSize[SizeIdx++], 1 ) == 0 ) {
+ return NULL; // no more data ?
+ }
+ ReadSize++;
PossibleSizeLength++;
}
......@@ -11,6 +11,7 @@ $(TARBALLS)/libebml-$(EBML_VERSION).tar.bz2:
libebml: libebml-$(EBML_VERSION).tar.bz2 .sum-ebml
$(UNPACK)
$(APPLY) $(SRC)/ebml/eof.patch
$(MOVE)
# libebml requires exceptions
......
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