mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against f0429adbffce1f67b88b8c0a3e3a5badb6d6526e.
[compobj.dll16-StringFromGUID2] Removed patch to fix implementation of compobj.dll16.StringFromGUID2 function (accepted upstream). [ntdll-Stack_Guard_Pages] Removed patch to handle stack guard pages on x86_64 (accepted upstream). [windowscodecs-PNG_Fixes] Removed patch to allocate correct amount of memory for PNG image data (accepted upstream).
This commit is contained in:
parent
7cbb25d95d
commit
7fefd606b8
@ -1,45 +0,0 @@
|
||||
From 9bfa901639b950dbfb16c67fe881f742445b30da Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 27 Feb 2016 00:49:36 +0100
|
||||
Subject: compobj.dll16: StringFromGUID2 must write a char string into the
|
||||
buffer.
|
||||
|
||||
---
|
||||
dlls/compobj.dll16/compobj.c | 13 +++++++++++--
|
||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/compobj.dll16/compobj.c b/dlls/compobj.dll16/compobj.c
|
||||
index 6261c13..9ec8556 100644
|
||||
--- a/dlls/compobj.dll16/compobj.c
|
||||
+++ b/dlls/compobj.dll16/compobj.c
|
||||
@@ -54,6 +54,7 @@ typedef LPCSTR LPCOLESTR16;
|
||||
#define STDMETHOD16(m) HRESULT (STDMETHOD16CALLTYPE *m)
|
||||
#define STDMETHOD16_(t,m) t (STDMETHOD16CALLTYPE *m)
|
||||
|
||||
+#define CHARS_IN_GUID 39
|
||||
|
||||
/***********************************************************************
|
||||
* IMalloc16 interface
|
||||
@@ -689,9 +690,17 @@ HRESULT WINAPI CLSIDFromProgID16(LPCOLESTR16 progid, LPCLSID riid)
|
||||
/******************************************************************************
|
||||
* StringFromGUID2 [COMPOBJ.76]
|
||||
*/
|
||||
-INT WINAPI StringFromGUID216(REFGUID id, LPOLESTR str, INT cmax)
|
||||
+INT WINAPI StringFromGUID216(REFGUID id, LPOLESTR16 str, INT cmax)
|
||||
{
|
||||
- return StringFromGUID2( id, str, cmax );
|
||||
+ static const char format[] = "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}";
|
||||
+
|
||||
+ if (!id || cmax < CHARS_IN_GUID) return 0;
|
||||
+
|
||||
+ sprintf( str, format, id->Data1, id->Data2, id->Data3,
|
||||
+ id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3],
|
||||
+ id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7] );
|
||||
+
|
||||
+ return CHARS_IN_GUID;
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: Fix implementation of compobj.dll16.StringFromGUID2 function
|
@ -1,4 +1,4 @@
|
||||
From 10503470d7495f2cd04287742e773aa9a87569f6 Mon Sep 17 00:00:00 2001
|
||||
From f781fe643462f94c07cef57b28403ab6a3b5348a Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Thu, 16 Oct 2014 23:26:35 +0200
|
||||
Subject: kernel32/tests: Add tests for NtQuerySection. (try 2)
|
||||
@ -8,10 +8,10 @@ Subject: kernel32/tests: Add tests for NtQuerySection. (try 2)
|
||||
1 file changed, 258 insertions(+)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c
|
||||
index d10d85d..ba49193 100644
|
||||
index 5503e25..fb8d598 100644
|
||||
--- a/dlls/kernel32/tests/virtual.c
|
||||
+++ b/dlls/kernel32/tests/virtual.c
|
||||
@@ -48,12 +48,30 @@ static PVOID (WINAPI *pRtlAddVectoredExceptionHandler)(ULONG, PVECTORED_EXCEPTI
|
||||
@@ -47,12 +47,30 @@ static PVOID (WINAPI *pRtlAddVectoredExceptionHandler)(ULONG, PVECTORED_EXCEPTI
|
||||
static ULONG (WINAPI *pRtlRemoveVectoredExceptionHandler)(PVOID);
|
||||
static BOOL (WINAPI *pGetProcessDEPPolicy)(HANDLE, LPDWORD, PBOOL);
|
||||
static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL);
|
||||
@ -42,7 +42,7 @@ index d10d85d..ba49193 100644
|
||||
static HANDLE create_target_process(const char *arg)
|
||||
{
|
||||
char **argv;
|
||||
@@ -3631,6 +3649,244 @@ static void test_shared_memory_ro(BOOL is_child, DWORD child_access)
|
||||
@@ -3768,6 +3786,244 @@ static void test_shared_memory_ro(BOOL is_child, DWORD child_access)
|
||||
CloseHandle(mapping);
|
||||
}
|
||||
|
||||
@ -287,15 +287,15 @@ index d10d85d..ba49193 100644
|
||||
START_TEST(virtual)
|
||||
{
|
||||
int argc;
|
||||
@@ -3684,6 +3940,7 @@ START_TEST(virtual)
|
||||
pNtCurrentTeb = (void *)GetProcAddress( hntdll, "NtCurrentTeb" );
|
||||
@@ -3820,6 +4076,7 @@ START_TEST(virtual)
|
||||
pNtUnmapViewOfSection = (void *)GetProcAddress( hntdll, "NtUnmapViewOfSection" );
|
||||
pRtlAddVectoredExceptionHandler = (void *)GetProcAddress( hntdll, "RtlAddVectoredExceptionHandler" );
|
||||
pRtlRemoveVectoredExceptionHandler = (void *)GetProcAddress( hntdll, "RtlRemoveVectoredExceptionHandler" );
|
||||
+ pNtQuerySection = (void *)GetProcAddress( hntdll, "NtQuerySection" );
|
||||
pNtProtectVirtualMemory = (void *)GetProcAddress( hntdll, "NtProtectVirtualMemory" );
|
||||
pNtAllocateVirtualMemory = (void *)GetProcAddress( hntdll, "NtAllocateVirtualMemory" );
|
||||
pNtFreeVirtualMemory = (void *)GetProcAddress( hntdll, "NtFreeVirtualMemory" );
|
||||
@@ -3693,6 +3950,7 @@ START_TEST(virtual)
|
||||
@@ -3829,6 +4086,7 @@ START_TEST(virtual)
|
||||
test_shared_memory_ro(FALSE, FILE_MAP_COPY);
|
||||
test_shared_memory_ro(FALSE, FILE_MAP_COPY|FILE_MAP_WRITE);
|
||||
test_mapping();
|
||||
@ -304,5 +304,5 @@ index d10d85d..ba49193 100644
|
||||
test_VirtualAlloc_protection();
|
||||
test_VirtualProtect();
|
||||
--
|
||||
2.4.2
|
||||
2.7.1
|
||||
|
||||
|
@ -1,45 +0,0 @@
|
||||
From d1f1c77ffb5eef8e440a9ba8a192cafde327227f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 26 Mar 2016 22:26:43 +0100
|
||||
Subject: ntdll: Handle stack guard pages on x86_64.
|
||||
|
||||
---
|
||||
dlls/ntdll/signal_x86_64.c | 20 +++++++++++++++++++-
|
||||
1 file changed, 19 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
|
||||
index 1e88df3..e00132e 100644
|
||||
--- a/dlls/ntdll/signal_x86_64.c
|
||||
+++ b/dlls/ntdll/signal_x86_64.c
|
||||
@@ -2587,9 +2587,27 @@ static inline BOOL handle_interrupt( unsigned int interrupt, EXCEPTION_RECORD *r
|
||||
*/
|
||||
static void segv_handler( int signal, siginfo_t *siginfo, void *sigcontext )
|
||||
{
|
||||
- EXCEPTION_RECORD *rec = setup_exception( sigcontext, raise_segv_exception );
|
||||
+ EXCEPTION_RECORD *rec;
|
||||
ucontext_t *ucontext = sigcontext;
|
||||
|
||||
+ /* check for page fault inside the thread stack */
|
||||
+ if (TRAP_sig(ucontext) == TRAP_x86_PAGEFLT &&
|
||||
+ (char *)siginfo->si_addr >= (char *)NtCurrentTeb()->DeallocationStack &&
|
||||
+ (char *)siginfo->si_addr < (char *)NtCurrentTeb()->Tib.StackBase &&
|
||||
+ virtual_handle_stack_fault( siginfo->si_addr ))
|
||||
+ {
|
||||
+ /* check if this was the last guard page */
|
||||
+ if ((char *)siginfo->si_addr < (char *)NtCurrentTeb()->DeallocationStack + 2*4096)
|
||||
+ {
|
||||
+ rec = setup_exception( sigcontext, raise_segv_exception );
|
||||
+ rec->ExceptionCode = EXCEPTION_STACK_OVERFLOW;
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ rec = setup_exception( sigcontext, raise_segv_exception );
|
||||
+ if (rec->ExceptionCode == EXCEPTION_STACK_OVERFLOW) return;
|
||||
+
|
||||
switch(TRAP_sig(ucontext))
|
||||
{
|
||||
case TRAP_x86_OFLOW: /* Overflow exception */
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: Handle stack guard pages on x86_64
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "ee9ae29a55b12b2c657f968fd3a958d72ecd7857"
|
||||
echo "f0429adbffce1f67b88b8c0a3e3a5badb6d6526e"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -97,7 +97,6 @@ patch_enable_all ()
|
||||
enable_comctl32_Button_Theming="$1"
|
||||
enable_comctl32_PROPSHEET_InsertPage="$1"
|
||||
enable_comctl32_TTM_ADDTOOLW="$1"
|
||||
enable_compobj_dll16_StringFromGUID2="$1"
|
||||
enable_configure_Absolute_RPATH="$1"
|
||||
enable_crypt32_CMS_Certificates="$1"
|
||||
enable_crypt32_CryptUnprotectMemory="$1"
|
||||
@ -224,7 +223,6 @@ patch_enable_all ()
|
||||
enable_ntdll_RtlIpStringToAddress_Tests="$1"
|
||||
enable_ntdll_RtlQueryPackageIdentity="$1"
|
||||
enable_ntdll_Serial_Port_Detection="$1"
|
||||
enable_ntdll_Stack_Guard_Pages="$1"
|
||||
enable_ntdll_Status_Mapping="$1"
|
||||
enable_ntdll_Syscall_Wrappers="$1"
|
||||
enable_ntdll_SystemInterruptInformation="$1"
|
||||
@ -345,7 +343,6 @@ patch_enable_all ()
|
||||
enable_widl_SLTG_Typelib_Support="$1"
|
||||
enable_windowscodecs_32bppGrayFloat="$1"
|
||||
enable_windowscodecs_IMILBitmapSource="$1"
|
||||
enable_windowscodecs_PNG_Fixes="$1"
|
||||
enable_windowscodecs_WICCreateBitmapFromSection="$1"
|
||||
enable_wine_inf_Directory_ContextMenuHandlers="$1"
|
||||
enable_wine_inf_Dummy_CA_Certificate="$1"
|
||||
@ -465,9 +462,6 @@ patch_enable ()
|
||||
comctl32-TTM_ADDTOOLW)
|
||||
enable_comctl32_TTM_ADDTOOLW="$2"
|
||||
;;
|
||||
compobj.dll16-StringFromGUID2)
|
||||
enable_compobj_dll16_StringFromGUID2="$2"
|
||||
;;
|
||||
configure-Absolute_RPATH)
|
||||
enable_configure_Absolute_RPATH="$2"
|
||||
;;
|
||||
@ -846,9 +840,6 @@ patch_enable ()
|
||||
ntdll-Serial_Port_Detection)
|
||||
enable_ntdll_Serial_Port_Detection="$2"
|
||||
;;
|
||||
ntdll-Stack_Guard_Pages)
|
||||
enable_ntdll_Stack_Guard_Pages="$2"
|
||||
;;
|
||||
ntdll-Status_Mapping)
|
||||
enable_ntdll_Status_Mapping="$2"
|
||||
;;
|
||||
@ -1209,9 +1200,6 @@ patch_enable ()
|
||||
windowscodecs-IMILBitmapSource)
|
||||
enable_windowscodecs_IMILBitmapSource="$2"
|
||||
;;
|
||||
windowscodecs-PNG_Fixes)
|
||||
enable_windowscodecs_PNG_Fixes="$2"
|
||||
;;
|
||||
windowscodecs-WICCreateBitmapFromSection)
|
||||
enable_windowscodecs_WICCreateBitmapFromSection="$2"
|
||||
;;
|
||||
@ -2807,18 +2795,6 @@ if test "$enable_comctl32_TTM_ADDTOOLW" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset compobj.dll16-StringFromGUID2
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/compobj.dll16/compobj.c
|
||||
# |
|
||||
if test "$enable_compobj_dll16_StringFromGUID2" -eq 1; then
|
||||
patch_apply compobj.dll16-StringFromGUID2/0001-compobj.dll16-StringFromGUID2-must-write-a-char-stri.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "compobj.dll16: StringFromGUID2 must write a char string into the buffer.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset configure-Absolute_RPATH
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@ -5032,18 +5008,6 @@ if test "$enable_ntdll_Serial_Port_Detection" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-Stack_Guard_Pages
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ntdll/signal_x86_64.c
|
||||
# |
|
||||
if test "$enable_ntdll_Stack_Guard_Pages" -eq 1; then
|
||||
patch_apply ntdll-Stack_Guard_Pages/0001-ntdll-Handle-stack-guard-pages-on-x86_64.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "ntdll: Handle stack guard pages on x86_64.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-Status_Mapping
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -7020,18 +6984,6 @@ if test "$enable_windowscodecs_IMILBitmapSource" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset windowscodecs-PNG_Fixes
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/windowscodecs/pngformat.c
|
||||
# |
|
||||
if test "$enable_windowscodecs_PNG_Fixes" -eq 1; then
|
||||
patch_apply windowscodecs-PNG_Fixes/0001-windowscodecs-Allocate-correct-amount-of-memory-for-.patch
|
||||
(
|
||||
echo '+ { "Dmitry Timoshkov", "windowscodecs: Allocate correct amount of memory for PNG image data.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset windowscodecs-WICCreateBitmapFromSection
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 88fdb199c976ff130003f9582e1a2c3662c700ad Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Wed, 6 Apr 2016 11:52:08 +0800
|
||||
Subject: windowscodecs: Allocate correct amount of memory for PNG image data.
|
||||
|
||||
Currently the memory being allocated 8 times exceeds the image size.
|
||||
---
|
||||
dlls/windowscodecs/pngformat.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c
|
||||
index cd9165b..3eb4d0e 100644
|
||||
--- a/dlls/windowscodecs/pngformat.c
|
||||
+++ b/dlls/windowscodecs/pngformat.c
|
||||
@@ -664,7 +664,7 @@ static HRESULT WINAPI PngDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p
|
||||
/* read the image data */
|
||||
This->width = ppng_get_image_width(This->png_ptr, This->info_ptr);
|
||||
This->height = ppng_get_image_height(This->png_ptr, This->info_ptr);
|
||||
- This->stride = This->width * This->bpp;
|
||||
+ This->stride = (This->width * This->bpp + 7) / 8;
|
||||
image_size = This->stride * This->height;
|
||||
|
||||
This->image_bits = HeapAlloc(GetProcessHeap(), 0, image_size);
|
||||
--
|
||||
2.7.1
|
||||
|
Loading…
Reference in New Issue
Block a user