You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Restore ole32-STGPROP patch 0001
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
From 9a73838c005c3bdb74a449bb7afb269112d6ae34 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 20 Jan 2017 01:35:05 +0100
|
||||
Subject: ole32: Correctly parse unicode property storage dictionaries.
|
||||
|
||||
---
|
||||
dlls/ole32/stg_prop.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c
|
||||
index a2598832bf1..f952704c7cd 100644
|
||||
--- a/dlls/ole32/stg_prop.c
|
||||
+++ b/dlls/ole32/stg_prop.c
|
||||
@@ -1020,15 +1020,18 @@ static HRESULT PropertyStorage_ReadDictionary(PropertyStorage_impl *This,
|
||||
if (This->codePage != CP_UNICODE)
|
||||
ptr[cbEntry - 1] = '\0';
|
||||
else
|
||||
- *((LPWSTR)ptr + cbEntry / sizeof(WCHAR)) = '\0';
|
||||
+ ((LPWSTR)ptr)[cbEntry - 1] = 0;
|
||||
hr = PropertyStorage_StoreNameWithId(This, (char*)ptr, This->codePage, propid);
|
||||
if (This->codePage == CP_UNICODE)
|
||||
{
|
||||
+ /* cbEntry is the number of characters */
|
||||
+ cbEntry *= 2;
|
||||
+
|
||||
/* Unicode entries are padded to DWORD boundaries */
|
||||
if (cbEntry % sizeof(DWORD))
|
||||
ptr += sizeof(DWORD) - (cbEntry % sizeof(DWORD));
|
||||
}
|
||||
- ptr += sizeof(DWORD) + cbEntry;
|
||||
+ ptr += cbEntry;
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
--
|
||||
2.11.0
|
||||
|
||||
1
patches/ole32-STGPROP/definition
Normal file
1
patches/ole32-STGPROP/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [42046] Multiple fixes for ole32 property storage
|
||||
Reference in New Issue
Block a user