From 7079d594fa45495b411949d65d1d3a8f5dfecdcd Mon Sep 17 00:00:00 2001 From: Edward Barnard Date: Wed, 19 Apr 2017 09:31:26 +0100 Subject: Fix reading small binary plists with data stored in the 6 byte trailer padding. Closes #20. --- src/binary/reader.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/binary') diff --git a/src/binary/reader.rs b/src/binary/reader.rs index 770b12f..d9bf667 100644 --- a/src/binary/reader.rs +++ b/src/binary/reader.rs @@ -93,7 +93,7 @@ impl EventReader { // File size minus trailer and header // Truncated to max(usize) - self.max_allocation = trailer_start.saturating_sub(6 + 8) as usize; + self.max_allocation = trailer_start.saturating_sub(8) as usize; // Read offset table try!(self.reader.seek(SeekFrom::Start(offset_table_offset))); -- cgit v1.2.3