When checking for buffer overruns in PropertyStorage_ReadFromStream, replace a >= with a >. Previously we were rejecting reads that ran up to the exact last byte of the buffer.
Andrew Bogott
andrew at CodeWeavers.com
Sat Nov 20 13:43:01 CST 2010
---
dlls/ole32/stg_prop.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c
index b3362bc..65b4b2e 100644
--- a/dlls/ole32/stg_prop.c
+++ b/dlls/ole32/stg_prop.c
@@ -1356,7 +1356,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
i * sizeof(PROPERTYIDOFFSET));
if (idOffset->dwOffset < sizeof(PROPERTYSECTIONHEADER) ||
- idOffset->dwOffset >= sectionHdr.cbSection - sizeof(DWORD))
+ idOffset->dwOffset > sectionHdr.cbSection - sizeof(DWORD))
hr = STG_E_INVALIDPOINTER;
else
{
--
1.6.5
--------------070907040508080805080300--
More information about the wine-patches
mailing list