Vincent Povirk : ole32: Ignore high part of size in storage version 3 files.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Aug 6 10:15:44 CDT 2015
Module: wine
Branch: master
Commit: 9d517a1727f7de379912019e417d87634427288b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9d517a1727f7de379912019e417d87634427288b
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Wed Aug 5 16:33:07 2015 -0500
ole32: Ignore high part of size in storage version 3 files.
---
dlls/ole32/storage32.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index ce72b73..c881620 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -3446,10 +3446,18 @@ static HRESULT StorageImpl_ReadDirEntry(
OFFSET_PS_SIZE,
&buffer->size.u.LowPart);
- StorageUtl_ReadDWord(
- currentEntry,
- OFFSET_PS_SIZE_HIGH,
- &buffer->size.u.HighPart);
+ if (This->bigBlockSize < 4096)
+ {
+ /* Version 3 files may have junk in the high part of size. */
+ buffer->size.u.HighPart = 0;
+ }
+ else
+ {
+ StorageUtl_ReadDWord(
+ currentEntry,
+ OFFSET_PS_SIZE_HIGH,
+ &buffer->size.u.HighPart);
+ }
}
return readRes;
More information about the wine-cvs
mailing list