aboutsummaryrefslogtreecommitdiffstats
path: root/src/binary
diff options
context:
space:
mode:
authorEdward Barnard2017-04-19 09:31:26 +0100
committerEdward Barnard2017-04-19 09:31:26 +0100
commit7079d594fa45495b411949d65d1d3a8f5dfecdcd (patch)
treeae500b3fd6453b76ff3a85593ecd429f8d2ba27e /src/binary
parent1df5db005ea9959c4e19107997f446dc17095be4 (diff)
downloadrust-plist-7079d594fa45495b411949d65d1d3a8f5dfecdcd.tar.bz2
Fix reading small binary plists with data stored in the 6 byte trailer padding. Closes #20.v0.1.3
Diffstat (limited to 'src/binary')
-rw-r--r--src/binary/reader.rs2
1 files changed, 1 insertions, 1 deletions
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<R: Read + Seek> EventReader<R> {
// 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)));