diff --git a/src/io/readers/file_readers/tdf_blob_reader.rs b/src/io/readers/file_readers/tdf_blob_reader.rs index b37415b..490efc1 100644 --- a/src/io/readers/file_readers/tdf_blob_reader.rs +++ b/src/io/readers/file_readers/tdf_blob_reader.rs @@ -65,7 +65,7 @@ impl TdfBlobReader { byte_count: usize, offset: usize, ) -> Result { - if (byte_count <= (HEADER_SIZE * U32_SIZE)) + if (byte_count < (HEADER_SIZE * U32_SIZE)) || ((offset + byte_count) > self.len()) { return Err(TdfBlobError::ByteCount(