Rebase against ee17400c05d88fa29d0b895fa01902adfc91ba7f.

This commit is contained in:
Alistair Leslie-Hughes 2023-09-21 07:52:19 +10:00
parent c4da0a8993
commit b3e9ea1058
4 changed files with 43 additions and 41 deletions

View File

@ -1,4 +1,4 @@
From a9cd52667f49a57900a08591cd66b40747a12db0 Mon Sep 17 00:00:00 2001
From 1e6c40cf8a92d7873f1689d64936cd4dfd32f246 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Thu, 21 Apr 2016 14:40:58 +0800
Subject: [PATCH] oleaut32: OleLoadPicture should create a DIB section for a
@ -12,7 +12,7 @@ NULL, otherwise it crashes).
2 files changed, 27 insertions(+), 40 deletions(-)
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index 45baa74a439..22a34d6e380 100644
index 8df0c22b6cf..b41668a4aeb 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -983,23 +983,16 @@ static HRESULT OLEPictureImpl_LoadDIB(OLEPictureImpl *This, BYTE *xbuf, ULONG xr
@ -62,9 +62,9 @@ index 45baa74a439..22a34d6e380 100644
stride = 4 * width;
buffersize = stride * height;
- bits = HeapAlloc(GetProcessHeap(), 0, buffersize);
- bits = malloc(buffersize);
- if (!bits)
+ mask = HeapAlloc(GetProcessHeap(), 0, buffersize);
+ mask = malloc(buffersize);
+ if (!mask)
{
hr = E_OUTOFMEMORY;
@ -143,13 +143,13 @@ index 45baa74a439..22a34d6e380 100644
- ReleaseDC(0, hdcref);
-
end:
- HeapFree(GetProcessHeap(), 0, bits);
+ HeapFree(GetProcessHeap(), 0, mask);
- free(bits);
+ free(mask);
IWICBitmapSource_Release(real_source);
return hr;
}
diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c
index 7b45b690935..fa7e8009cbd 100644
index 02d53404e32..98d081b745e 100644
--- a/dlls/oleaut32/tests/olepicture.c
+++ b/dlls/oleaut32/tests/olepicture.c
@@ -239,7 +239,7 @@ test_pic_with_stream(LPSTREAM stream, unsigned int imgsize)

View File

@ -1,19 +1,19 @@
From 9890259605aa0c35db96e3709f7fad6e840aa29c Mon Sep 17 00:00:00 2001
From cca2b1bf5ffed383620c26fdb7a37c21dbd38171 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 26 Jan 2016 15:05:54 +0800
Subject: oleaut32: Implement decoding of SLTG help strings.
Subject: [PATCH] oleaut32: Implement decoding of SLTG help strings.
Based on the patch by Sebastian Lackner <sebastian@fds-team.de>.
---
dlls/oleaut32/typelib.c | 130 +++++++++++++++++++++++++++++++++++++++---------
dlls/oleaut32/typelib.c | 134 ++++++++++++++++++++++++++++++++--------
dlls/oleaut32/typelib.h | 4 +-
2 files changed, 109 insertions(+), 25 deletions(-)
2 files changed, 111 insertions(+), 27 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 82ea76c..0a5e07c 100644
index 1740472c9e8..d5c8191abba 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -3703,6 +3703,87 @@ static BOOL TLB_GUIDFromString(const char *str, GUID *guid)
@@ -3680,6 +3680,87 @@ static BOOL TLB_GUIDFromString(const char *str, GUID *guid)
return TRUE;
}
@ -101,7 +101,7 @@ index 82ea76c..0a5e07c 100644
static WORD SLTG_ReadString(const char *ptr, const TLBString **pStr, ITypeLibImpl *lib)
{
WORD bytelen;
@@ -4386,17 +4467,17 @@ static void SLTG_ProcessModule(char *pBlk, ITypeInfoImpl *pTI,
@@ -4366,17 +4447,17 @@ static void SLTG_ProcessModule(char *pBlk, ITypeInfoImpl *pTI,
/* Because SLTG_OtherTypeInfo is such a painful struct, we make a more
manageable copy of it into this */
typedef struct {
@ -121,7 +121,7 @@ index 82ea76c..0a5e07c 100644
} SLTG_InternalOtherTypeInfo;
/****************************************************************************
@@ -4415,8 +4496,8 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
@@ -4395,8 +4476,8 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
LPVOID pBlk, pFirstBlk;
SLTG_LibBlk *pLibBlk;
SLTG_InternalOtherTypeInfo *pOtherTypeInfoBlks;
@ -131,14 +131,14 @@ index 82ea76c..0a5e07c 100644
int i;
DWORD len, order;
ITypeInfoImpl **ppTypeInfoImpl;
@@ -4482,53 +4563,55 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
@@ -4462,53 +4543,55 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
len += 0x40;
/* And now TypeInfoCount of SLTG_OtherTypeInfo */
+ pTypeLibImpl->TypeInfoCount = *(WORD *)((char *)pLibBlk + len);
+ len += sizeof(WORD);
pOtherTypeInfoBlks = heap_alloc_zero(sizeof(*pOtherTypeInfoBlks) * pTypeLibImpl->TypeInfoCount);
pOtherTypeInfoBlks = calloc(pTypeLibImpl->TypeInfoCount, sizeof(*pOtherTypeInfoBlks));
-
ptr = (char*)pLibBlk + len;
@ -153,8 +153,9 @@ index 82ea76c..0a5e07c 100644
+ w = *(WORD*)ptr;
if(w != 0xffff) {
len += w;
pOtherTypeInfoBlks[i].index_name = heap_alloc(w+1);
- pOtherTypeInfoBlks[i].index_name = malloc(w + 1);
- memcpy(pOtherTypeInfoBlks[i].index_name, ptr + 4, w);
+ pOtherTypeInfoBlks[i].index_name = malloc(w+1);
+ memcpy(pOtherTypeInfoBlks[i].index_name, ptr + 2, w);
pOtherTypeInfoBlks[i].index_name[w] = '\0';
}
@ -163,9 +164,10 @@ index 82ea76c..0a5e07c 100644
if(w != 0xffff) {
- TRACE_(typelib)("\twith %s\n", debugstr_an(ptr + 6 + len, w));
- len += w;
+ TRACE_(typelib)("\twith %s\n", debugstr_an(ptr + 4 + len, w));
pOtherTypeInfoBlks[i].other_name = heap_alloc(w+1);
- pOtherTypeInfoBlks[i].other_name = malloc(w + 1);
- memcpy(pOtherTypeInfoBlks[i].other_name, ptr + 6 + len, w);
+ TRACE_(typelib)("\twith %s\n", debugstr_an(ptr + 4 + len, w));
+ pOtherTypeInfoBlks[i].other_name = malloc(w+1);
+ memcpy(pOtherTypeInfoBlks[i].other_name, ptr + 4 + len, w);
pOtherTypeInfoBlks[i].other_name[w] = '\0';
+ len += w;
@ -177,7 +179,7 @@ index 82ea76c..0a5e07c 100644
+ pOtherTypeInfoBlks[i].name_offs = *(WORD*)(ptr + 6 + len);
+ extra = pOtherTypeInfoBlks[i].hlpstr_len = *(WORD*)(ptr + 8 + len);
if(extra) {
pOtherTypeInfoBlks[i].extra = heap_alloc(extra);
pOtherTypeInfoBlks[i].extra = malloc(extra);
- memcpy(pOtherTypeInfoBlks[i].extra, ptr + 12, extra);
+ memcpy(pOtherTypeInfoBlks[i].extra, ptr + 10 + len, extra);
len += extra;
@ -207,7 +209,7 @@ index 82ea76c..0a5e07c 100644
/* Now add this to pLibBLk look at what we're pointing at and
possibly add 0x20, then add 0x216, sprinkle a bit a magic
@@ -4594,6 +4677,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
@@ -4574,6 +4657,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
(*ppTypeInfoImpl)->index = i;
(*ppTypeInfoImpl)->Name = SLTG_ReadName(pNameTable, pOtherTypeInfoBlks[i].name_offs, pTypeLibImpl);
(*ppTypeInfoImpl)->dwHelpContext = pOtherTypeInfoBlks[i].helpcontext;
@ -216,10 +218,10 @@ index 82ea76c..0a5e07c 100644
(*ppTypeInfoImpl)->typeattr.typekind = pTIHeader->typekind;
(*ppTypeInfoImpl)->typeattr.wMajorVerNum = pTIHeader->major_version;
diff --git a/dlls/oleaut32/typelib.h b/dlls/oleaut32/typelib.h
index 31c9ab9..93b96ea 100644
index 515d4b557e6..bfe908c035f 100644
--- a/dlls/oleaut32/typelib.h
+++ b/dlls/oleaut32/typelib.h
@@ -387,18 +387,18 @@ typedef struct {
@@ -382,18 +382,18 @@ typedef struct {
/* we then get 0x40 bytes worth of 0xffff or small numbers followed by
nrOfFileBlks - 2 of these */
typedef struct {
@ -241,5 +243,5 @@ index 31c9ab9..93b96ea 100644
/* Next we get WORD 0x0003 followed by a DWORD which if we add to
--
2.9.0
2.40.1

View File

@ -1,4 +1,4 @@
From 34a06e7077076e43a84eaa9877a94cdfbc750cc0 Mon Sep 17 00:00:00 2001
From fc31e1c213619af67684a99aa1d3b4c27ee9617d Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 26 Jan 2016 15:41:06 +0800
Subject: [PATCH] oleaut32: Add support for decoding SLTG function help
@ -9,10 +9,10 @@ Subject: [PATCH] oleaut32: Add support for decoding SLTG function help
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index d171956bf46..25d2c304722 100644
index d5c8191abba..ebf186edc2a 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -4237,7 +4237,8 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
@@ -4203,7 +4203,8 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign
}
static void SLTG_DoFuncs(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI,
@ -22,7 +22,7 @@ index d171956bf46..25d2c304722 100644
{
SLTG_Function *pFunc;
unsigned short i;
@@ -4278,6 +4279,9 @@ static void SLTG_DoFuncs(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI,
@@ -4244,6 +4245,9 @@ static void SLTG_DoFuncs(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI,
else
pFuncDesc->funcdesc.oVft = (pFunc->vtblpos & ~1) * sizeof(void *) / pTI->pTypeLib->ptr_size;
@ -32,7 +32,7 @@ index d171956bf46..25d2c304722 100644
if(pFunc->magic & SLTG_FUNCTION_FLAGS_PRESENT)
pFuncDesc->funcdesc.wFuncFlags = pFunc->funcflags;
@@ -4364,7 +4368,7 @@ static void SLTG_ProcessCoClass(char *pBlk, ITypeInfoImpl *pTI,
@@ -4330,7 +4334,7 @@ static void SLTG_ProcessCoClass(char *pBlk, ITypeInfoImpl *pTI,
static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI,
char *pNameTable, SLTG_TypeInfoHeader *pTIHeader,
@ -41,16 +41,16 @@ index d171956bf46..25d2c304722 100644
{
char *pFirstItem;
sltg_ref_lookup_t *ref_lookup = NULL;
@@ -4381,7 +4385,7 @@ static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI,
@@ -4347,7 +4351,7 @@ static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI,
}
if (pTITail->funcs_off != 0xffff)
- SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup);
+ SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup, hlp_strings);
heap_free(ref_lookup);
free(ref_lookup);
@@ -4426,7 +4430,7 @@ static void SLTG_ProcessAlias(char *pBlk, ITypeInfoImpl *pTI,
@@ -4392,7 +4396,7 @@ static void SLTG_ProcessAlias(char *pBlk, ITypeInfoImpl *pTI,
static void SLTG_ProcessDispatch(char *pBlk, ITypeInfoImpl *pTI,
char *pNameTable, SLTG_TypeInfoHeader *pTIHeader,
@ -59,7 +59,7 @@ index d171956bf46..25d2c304722 100644
{
sltg_ref_lookup_t *ref_lookup = NULL;
if (pTIHeader->href_table != 0xffffffff)
@@ -4437,7 +4441,7 @@ static void SLTG_ProcessDispatch(char *pBlk, ITypeInfoImpl *pTI,
@@ -4403,7 +4407,7 @@ static void SLTG_ProcessDispatch(char *pBlk, ITypeInfoImpl *pTI,
SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, ref_lookup);
if (pTITail->funcs_off != 0xffff)
@ -68,7 +68,7 @@ index d171956bf46..25d2c304722 100644
if (pTITail->impls_off != 0xffff)
SLTG_DoImpls(pBlk + pTITail->impls_off, pTI, FALSE, ref_lookup);
@@ -4461,7 +4465,7 @@ static void SLTG_ProcessEnum(char *pBlk, ITypeInfoImpl *pTI,
@@ -4427,7 +4431,7 @@ static void SLTG_ProcessEnum(char *pBlk, ITypeInfoImpl *pTI,
static void SLTG_ProcessModule(char *pBlk, ITypeInfoImpl *pTI,
char *pNameTable, SLTG_TypeInfoHeader *pTIHeader,
@ -77,16 +77,16 @@ index d171956bf46..25d2c304722 100644
{
sltg_ref_lookup_t *ref_lookup = NULL;
if (pTIHeader->href_table != 0xffffffff)
@@ -4472,7 +4476,7 @@ static void SLTG_ProcessModule(char *pBlk, ITypeInfoImpl *pTI,
@@ -4438,7 +4442,7 @@ static void SLTG_ProcessModule(char *pBlk, ITypeInfoImpl *pTI,
SLTG_DoVars(pBlk, pBlk + pTITail->vars_off, pTI, pTITail->cVars, pNameTable, ref_lookup);
if (pTITail->funcs_off != 0xffff)
- SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup);
+ SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup, hlp_strings);
heap_free(ref_lookup);
free(ref_lookup);
if (TRACE_ON(typelib))
dump_TypeInfo(pTI);
@@ -4734,7 +4738,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
@@ -4700,7 +4704,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
case TKIND_INTERFACE:
SLTG_ProcessInterface((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable,
@ -95,7 +95,7 @@ index d171956bf46..25d2c304722 100644
break;
case TKIND_COCLASS:
@@ -4749,12 +4753,12 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
@@ -4715,12 +4719,12 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength)
case TKIND_DISPATCH:
SLTG_ProcessDispatch((char *)(pMemHeader + 1), *ppTypeInfoImpl, pNameTable,
@ -111,5 +111,5 @@ index d171956bf46..25d2c304722 100644
default:
--
2.28.0
2.40.1

View File

@ -1 +1 @@
6558611fa2d24447297cb62d168b924c33839c43
ee17400c05d88fa29d0b895fa01902adfc91ba7f