From a772577a983a62ab2a8bef0f1c886884e79933a0 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Fri, 6 Nov 2026 11:59:12 +0100 Subject: [PATCH] EbmlBinary: use readFully() to read the data We don't support truncated reading of elements. And it was the last class not to use readFully(). Fixes #360 --- src/EbmlBinary.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/EbmlBinary.cpp b/src/EbmlBinary.cpp index 8c801358..c386a6a1 100644 --- a/src/EbmlBinary.cpp +++ b/src/EbmlBinary.cpp @@ -73,8 +73,9 @@ filepos_t EbmlBinary::ReadData(IOCallback & input, ScopeMode ReadFully) Data = (GetSize() < SIZE_MAX) ? static_cast(malloc(GetSize())) : nullptr; if (Data == nullptr) throw CRTError(std::string("Error allocating data")); + input.readFully(Data, GetSize()); SetValueIsSet(); - return input.read(Data, GetSize()); + return GetSize(); } bool EbmlBinary::operator==(const EbmlBinary & ElementToCompare) const