From 9d517a1727f7de379912019e417d87634427288b Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Wed, 5 Aug 2015 16:33:07 -0500 Subject: [PATCH] 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 ce72b73ed21..c8816209132 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;