rossknudsen/OpenMCDF — pull request #1 by oleholstandersen (2014-09-14 15:30:15+00:00)
Title: Fixed issue with DirectoryEntry in V3 document having non-zero upper 32 bit in size field

I have encountered some Microsoft Word 6.0/95 that the OpenMcdf cannot handle.

The problem is that the upper 32 bits of the size field in the DirectoryEntry for the WordDocument entry are not zero, but in fact 0xFF. This is of course formally an error, but I found the following remark in the official Microsoft specs of the DirectoryEntry, [MS-CFD Section 2.6.1](http://msdn.microsoft.com/en-us/library/dd942175.aspx):

> ... Although this document does not normatively specify parser behavior, it is recommended that parsers ignore the most significant 32 bits of this field in version 3 compound files, treating it as if its value were zero, unless there is a specific reason to do otherwise (for example, a parser whose purpose is to verify the correctness of a compound file).

I have attempted to fix this by passing the version attribute to the DirectoryEntry.Read method and only reading the lower 32 bits of the size field when the version is 3.