Closed provegard closed 1 year ago
Thank you @provegard and sorry for response after all this time. I've pushed your fix to master branch. I haven't still found a "real world" file example to check so there is no specific test added. If you're still using OpenMcdf please open a new ticket if you find something wrong with the implementation or attach a file (with no sensitive info obviously) to add to test files. Thank you very much, Best Regards, Federico
Hi!
I encountered a couple of bugs that prevents me from reading OLE properties. The bugs relate to reading a
DictionaryProperty
.The first two problems are in
DictionaryEntry.cs
:This code path is taken when the property name consists of Unicode-16 characters. However,
Length << 2
multiplies with 4, not 2.Furthermore, the reading of padding uses
Length
rather than the actual bytes length:Here are the necessary changes:
The last problem is in
OLEPropertiesContainer.cs
:This results in
InvalidCastException
becauseDictionaryProperty
is not aDictionary<uint, string>
.The necessary change:
If you like, I can prepare a PR with a test case and the changes.