do not allow too big String sizes

the max value is the same as in EbmlBinary and is still generous
This commit is contained in:
Steve Lhomme 2015-02-23 11:27:17 +01:00
parent b1a4c9ac00
commit 108f7fd5fe

View File

@ -55,7 +55,7 @@ class EBML_DLL_API EbmlString : public EbmlElement {
virtual ~EbmlString() {}
virtual bool ValidateSize() const {return IsFiniteSize();} // any size is possible
virtual bool ValidateSize() const {return IsFiniteSize() && GetSize() < 0x7FFFFFFF;} // any size is possible
filepos_t RenderData(IOCallback & output, bool bForceRender, bool bWithDefault = false);
filepos_t ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
filepos_t UpdateSize(bool bWithDefault = false, bool bForceRender = false);