mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Added various patches for imagehlp cleanup (fixes Wine Staging Bug #502).
This commit is contained in:
parent
e95a773114
commit
03a15069bc
@ -39,9 +39,11 @@ Wine. All those differences are also documented on the
|
||||
Included bug fixes and improvements
|
||||
-----------------------------------
|
||||
|
||||
**Bug fixes and features included in the next upcoming release [1]:**
|
||||
**Bug fixes and features included in the next upcoming release [3]:**
|
||||
|
||||
* Catch invalid memory accesses in imagehlp.CheckSumMappedFile
|
||||
* Implement vcomp locking functions ([Wine Bug #26688](https://bugs.winehq.org/show_bug.cgi?id=26688))
|
||||
* Properly implement imagehlp.ImageLoad and ImageUnload
|
||||
|
||||
|
||||
**Bug fixes and features in Wine Staging 1.7.49 [235]:**
|
||||
|
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -1,5 +1,6 @@
|
||||
wine-staging (1.7.50) UNRELEASED; urgency=low
|
||||
* Add patch to implement remaining OpenMP locking functions.
|
||||
* Added various patches for imagehlp cleanup (fixes Wine Staging Bug #502).
|
||||
-- Sebastian Lackner <sebastian@fds-team.de> Tue, 11 Aug 2015 06:12:14 +0200
|
||||
|
||||
wine-staging (1.7.49) unstable; urgency=low
|
||||
|
@ -0,0 +1,404 @@
|
||||
From a7ed2b13874bd662db8bf30df7b7f394e279e687 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 11 Aug 2015 02:23:20 +0200
|
||||
Subject: imagehlp: Catch invalid memory access in CheckSumMappedFile and add
|
||||
tests.
|
||||
|
||||
---
|
||||
dlls/imagehlp/modify.c | 55 +++++----
|
||||
dlls/imagehlp/tests/integrity.c | 252 +++++++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 283 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/dlls/imagehlp/modify.c b/dlls/imagehlp/modify.c
|
||||
index debccc0..aa29ca7 100644
|
||||
--- a/dlls/imagehlp/modify.c
|
||||
+++ b/dlls/imagehlp/modify.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "winternl.h"
|
||||
#include "winerror.h"
|
||||
#include "wine/debug.h"
|
||||
+#include "wine/exception.h"
|
||||
#include "imagehlp.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(imagehlp);
|
||||
@@ -92,37 +93,45 @@ PIMAGE_NT_HEADERS WINAPI CheckSumMappedFile(
|
||||
IMAGE_DOS_HEADER *dos = (IMAGE_DOS_HEADER *) BaseAddress;
|
||||
PIMAGE_NT_HEADERS32 Header32;
|
||||
PIMAGE_NT_HEADERS64 Header64;
|
||||
+ PIMAGE_NT_HEADERS ret = NULL;
|
||||
DWORD *ChecksumFile;
|
||||
DWORD CalcSum;
|
||||
- DWORD HdrSum;
|
||||
+ DWORD HdrSum = 0;
|
||||
|
||||
TRACE("(%p, %d, %p, %p)\n",
|
||||
BaseAddress, FileLength, HeaderSum, CheckSum
|
||||
);
|
||||
|
||||
- CalcSum = (DWORD)CalcCheckSum(0,
|
||||
- BaseAddress,
|
||||
- (FileLength + 1) / sizeof(WORD));
|
||||
+ CalcSum = (DWORD)CalcCheckSum(0, BaseAddress, (FileLength + 1) / sizeof(WORD));
|
||||
|
||||
- if (dos->e_magic != IMAGE_DOS_SIGNATURE)
|
||||
- return NULL;
|
||||
-
|
||||
- Header32 = (IMAGE_NT_HEADERS32 *)((char *)dos + dos->e_lfanew);
|
||||
-
|
||||
- if (Header32->Signature != IMAGE_NT_SIGNATURE)
|
||||
- return NULL;
|
||||
-
|
||||
- if (Header32->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC)
|
||||
- ChecksumFile = &Header32->OptionalHeader.CheckSum;
|
||||
- else if (Header32->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC)
|
||||
+ __TRY
|
||||
{
|
||||
- Header64 = (IMAGE_NT_HEADERS64 *)Header32;
|
||||
- ChecksumFile = &Header64->OptionalHeader.CheckSum;
|
||||
+ if (dos->e_magic != IMAGE_DOS_SIGNATURE)
|
||||
+ break;
|
||||
+
|
||||
+ Header32 = (IMAGE_NT_HEADERS32 *)((char *)dos + dos->e_lfanew);
|
||||
+ if (Header32->Signature != IMAGE_NT_SIGNATURE)
|
||||
+ break;
|
||||
+
|
||||
+ ret = (PIMAGE_NT_HEADERS)Header32;
|
||||
+
|
||||
+ if (Header32->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC)
|
||||
+ ChecksumFile = &Header32->OptionalHeader.CheckSum;
|
||||
+ else if (Header32->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC)
|
||||
+ {
|
||||
+ Header64 = (IMAGE_NT_HEADERS64 *)Header32;
|
||||
+ ChecksumFile = &Header64->OptionalHeader.CheckSum;
|
||||
+ }
|
||||
+ else
|
||||
+ break;
|
||||
+
|
||||
+ HdrSum = *ChecksumFile;
|
||||
}
|
||||
- else
|
||||
- return NULL;
|
||||
-
|
||||
- HdrSum = *ChecksumFile;
|
||||
+ __EXCEPT_PAGE_FAULT
|
||||
+ {
|
||||
+ /* nothing */
|
||||
+ }
|
||||
+ __ENDTRY
|
||||
|
||||
/* Subtract image checksum from calculated checksum. */
|
||||
/* fix low word of checksum */
|
||||
@@ -149,9 +158,9 @@ PIMAGE_NT_HEADERS WINAPI CheckSumMappedFile(
|
||||
CalcSum += FileLength;
|
||||
|
||||
*CheckSum = CalcSum;
|
||||
- *HeaderSum = *ChecksumFile;
|
||||
+ *HeaderSum = HdrSum;
|
||||
|
||||
- return (PIMAGE_NT_HEADERS) Header32;
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
diff --git a/dlls/imagehlp/tests/integrity.c b/dlls/imagehlp/tests/integrity.c
|
||||
index 3fa359f..7dd8ff4 100644
|
||||
--- a/dlls/imagehlp/tests/integrity.c
|
||||
+++ b/dlls/imagehlp/tests/integrity.c
|
||||
@@ -26,8 +26,9 @@
|
||||
#include "winerror.h"
|
||||
#include "winnt.h"
|
||||
#include "imagehlp.h"
|
||||
+#include "psapi.h"
|
||||
|
||||
-static HMODULE hImageHlp;
|
||||
+static HMODULE hImageHlp, hPsapi;
|
||||
static char test_dll_path[MAX_PATH];
|
||||
|
||||
static BOOL (WINAPI *pImageAddCertificate)(HANDLE, LPWIN_CERTIFICATE, PDWORD);
|
||||
@@ -35,6 +36,9 @@ static BOOL (WINAPI *pImageEnumerateCertificates)(HANDLE, WORD, PDWORD, PDWORD,
|
||||
static BOOL (WINAPI *pImageGetCertificateData)(HANDLE, DWORD, LPWIN_CERTIFICATE, PDWORD);
|
||||
static BOOL (WINAPI *pImageGetCertificateHeader)(HANDLE, DWORD, LPWIN_CERTIFICATE);
|
||||
static BOOL (WINAPI *pImageRemoveCertificate)(HANDLE, DWORD);
|
||||
+static PIMAGE_NT_HEADERS (WINAPI *pCheckSumMappedFile)(PVOID, DWORD, PDWORD, PDWORD);
|
||||
+
|
||||
+static BOOL (WINAPI *pGetModuleInformation)(HANDLE, HMODULE, LPMODULEINFO, DWORD cb);
|
||||
|
||||
static const char test_cert_data[] =
|
||||
{0x30,0x82,0x02,0xE1,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x02
|
||||
@@ -90,6 +94,27 @@ static const char test_cert_data[] =
|
||||
|
||||
static const char test_cert_data_2[] = {0xDE,0xAD,0xBE,0xEF,0x01,0x02,0x03};
|
||||
|
||||
+static char test_pe_executable[] =
|
||||
+{
|
||||
+ 0x4d,0x5a,0x90,0x00,0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xff,0xff,0x00,
|
||||
+ 0x00,0xb8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,
|
||||
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
+ 0x80,0x00,0x00,0x00,0x0e,0x1f,0xba,0x0e,0x00,0xb4,0x09,0xcd,0x21,0xb8,0x01,
|
||||
+ 0x4c,0xcd,0x21,0x54,0x68,0x69,0x73,0x20,0x70,0x72,0x6f,0x67,0x72,0x61,0x6d,
|
||||
+ 0x20,0x63,0x61,0x6e,0x6e,0x6f,0x74,0x20,0x62,0x65,0x20,0x72,0x75,0x6e,0x20,
|
||||
+ 0x69,0x6e,0x20,0x44,0x4f,0x53,0x20,0x6d,0x6f,0x64,0x65,0x2e,0x0d,0x0d,0x0a,
|
||||
+ 0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x45,0x00,0x00,0x4c,0x01,0x0f,
|
||||
+ 0x00,0xfd,0x38,0xc9,0x55,0x00,0x24,0x01,0x00,0xea,0x04,0x00,0x00,0xe0,0x00,
|
||||
+ 0x07,0x01,0x0b,0x01,0x02,0x18,0x00,0x1a,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,
|
||||
+ 0x06,0x00,0x00,0xe0,0x14,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x30,0x00,0x00,
|
||||
+ 0x00,0x00,0x40,0x00,0x00,0x10,0x00,0x00,0x00,0x02,0x00,0x00,0x04,0x00,0x00,
|
||||
+ 0x00,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,
|
||||
+ 0x01,0x00,0x00,0x04,0x00,0x00,/* checksum */ 0x11,0xEF,0xCD,0xAB,0x03,0x00,
|
||||
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x10,0x00,0x00,
|
||||
+ 0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00
|
||||
+};
|
||||
+
|
||||
static BOOL copy_dll_file(void)
|
||||
{
|
||||
char sys_dir[MAX_PATH+15];
|
||||
@@ -239,6 +264,223 @@ static void test_remove_certificate(int index)
|
||||
CloseHandle(hFile);
|
||||
}
|
||||
|
||||
+static DWORD _get_checksum_offset(PVOID base, PIMAGE_NT_HEADERS *nt_header, DWORD *checksum)
|
||||
+{
|
||||
+ IMAGE_DOS_HEADER *dos = (IMAGE_DOS_HEADER *)base;
|
||||
+ PIMAGE_NT_HEADERS32 Header32;
|
||||
+ PIMAGE_NT_HEADERS64 Header64;
|
||||
+
|
||||
+ if (dos->e_magic != IMAGE_DOS_SIGNATURE)
|
||||
+ return 0;
|
||||
+
|
||||
+ Header32 = (IMAGE_NT_HEADERS32 *)((char *)dos + dos->e_lfanew);
|
||||
+ if (Header32->Signature != IMAGE_NT_SIGNATURE)
|
||||
+ return 0;
|
||||
+
|
||||
+ *nt_header = (PIMAGE_NT_HEADERS)Header32;
|
||||
+
|
||||
+ if (Header32->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC)
|
||||
+ {
|
||||
+ *checksum = Header32->OptionalHeader.CheckSum;
|
||||
+ return (char *)&Header32->OptionalHeader.CheckSum - (char *)base;
|
||||
+ }
|
||||
+ else if (Header32->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC)
|
||||
+ {
|
||||
+ Header64 = (IMAGE_NT_HEADERS64 *)Header32;
|
||||
+ *checksum = Header64->OptionalHeader.CheckSum;
|
||||
+ return (char *)&Header64->OptionalHeader.CheckSum - (char *)base;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void test_pe_checksum(void)
|
||||
+{
|
||||
+ DWORD checksum_orig, checksum_new, checksum_off, checksum_correct;
|
||||
+ PIMAGE_NT_HEADERS nt_header;
|
||||
+ PIMAGE_NT_HEADERS ret;
|
||||
+ HMODULE quartz_data;
|
||||
+ char* quartz_base;
|
||||
+ MODULEINFO modinfo;
|
||||
+ char buffer[20];
|
||||
+ BOOL ret_bool;
|
||||
+
|
||||
+ if (!pCheckSumMappedFile)
|
||||
+ {
|
||||
+ win_skip("CheckSumMappedFile not supported, skipping tests\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile(NULL, 0, &checksum_orig, &checksum_new);
|
||||
+ ok(!ret, "Expected CheckSumMappedFile to fail, got %p\n", ret);
|
||||
+ ok(GetLastError() == 0xdeadbeef, "Expected err=0xdeadbeef, got %x\n", GetLastError());
|
||||
+ ok(checksum_orig == 0, "Expected 0, got %x\n", checksum_orig);
|
||||
+ ok(checksum_new == 0, "Expected 0, got %x\n", checksum_new);
|
||||
+
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile((void *)0xdeadbeef, 0, &checksum_orig, &checksum_new);
|
||||
+ ok(!ret, "Expected CheckSumMappedFile to fail, got %p\n", ret);
|
||||
+ ok(GetLastError() == 0xdeadbeef, "Expected err=0xdeadbeef, got %x\n", GetLastError());
|
||||
+ ok(checksum_orig == 0, "Expected 0, got %x\n", checksum_orig);
|
||||
+ ok(checksum_new == 0, "Expected 0, got %x\n", checksum_new);
|
||||
+
|
||||
+ if (0)
|
||||
+ {
|
||||
+ /* crashes on Windows */
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ pCheckSumMappedFile(0, 0x1000, &checksum_orig, &checksum_new);
|
||||
+ pCheckSumMappedFile((void *)0xdeadbeef, 0x1000, NULL, NULL);
|
||||
+ }
|
||||
+
|
||||
+ /* basic checksum tests */
|
||||
+ memset(buffer, 0x11, sizeof(buffer));
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile(buffer, sizeof(buffer), &checksum_orig, &checksum_new);
|
||||
+ ok(ret == NULL, "Expected NULL, got %p\n", ret);
|
||||
+ ok(checksum_orig == 0, "Expected 0, got %x\n", checksum_orig);
|
||||
+ ok(checksum_new == 0xaabe, "Expected 0xaabe, got %x\n", checksum_new);
|
||||
+
|
||||
+ memset(buffer, 0x22, sizeof(buffer));
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile(buffer, sizeof(buffer), &checksum_orig, &checksum_new);
|
||||
+ ok(ret == NULL, "Expected NULL, got %p\n", ret);
|
||||
+ ok(checksum_orig == 0, "Expected 0, got %x\n", checksum_orig);
|
||||
+ ok(checksum_new == 0x5569, "Expected 0x5569, got %x\n", checksum_new);
|
||||
+
|
||||
+ memset(buffer, 0x22, sizeof(buffer));
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile(buffer, 10, &checksum_orig, &checksum_new);
|
||||
+ ok(ret == NULL, "Expected NULL, got %p\n", ret);
|
||||
+ ok(checksum_orig == 0, "Expected 0, got %x\n", checksum_orig);
|
||||
+ ok(checksum_new == 0xaab4, "Expected 0xaab4, got %x\n", checksum_new);
|
||||
+
|
||||
+ memset(buffer, 0x22, sizeof(buffer));
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile(buffer, 11, &checksum_orig, &checksum_new);
|
||||
+ ok(ret == NULL, "Expected NULL, got %p\n", ret);
|
||||
+ ok(checksum_orig == 0, "Expected 0, got %x\n", checksum_orig);
|
||||
+ todo_wine ok(checksum_new == 0xaad7, "Expected 0xaad7, got %x\n", checksum_new);
|
||||
+
|
||||
+ /* test checksum of PE module */
|
||||
+ memset(buffer, 0x22, sizeof(buffer));
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile(test_pe_executable, sizeof(test_pe_executable),
|
||||
+ &checksum_orig, &checksum_new);
|
||||
+ ok((char *)ret == test_pe_executable + 0x80, "Expected %p, got %p\n", test_pe_executable + 0x80, ret);
|
||||
+ ok(checksum_orig == 0xabcdef11, "Expected 0xabcdef11, got %x\n", checksum_orig);
|
||||
+ ok(checksum_new == 0xaa4, "Expected 0xaa4, got %x\n", checksum_new);
|
||||
+
|
||||
+ if (!pGetModuleInformation)
|
||||
+ {
|
||||
+ win_skip("GetModuleInformation not supported, skipping tests\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ ret_bool = pGetModuleInformation(GetCurrentProcess(), GetModuleHandleA(NULL),
|
||||
+ &modinfo, sizeof(modinfo));
|
||||
+ ok(ret_bool, "GetModuleInformation failed, error: %x\n", GetLastError());
|
||||
+
|
||||
+ if (0)
|
||||
+ {
|
||||
+ /* crashes on Windows */
|
||||
+ pCheckSumMappedFile(modinfo.lpBaseOfDll, modinfo.SizeOfImage, NULL, NULL);
|
||||
+ }
|
||||
+
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile(modinfo.lpBaseOfDll, modinfo.SizeOfImage, &checksum_orig, &checksum_new);
|
||||
+ ok(ret != NULL, "Expected CheckSumMappedFile to succeed\n");
|
||||
+ ok(GetLastError() == 0xdeadbeef, "Expected err=0xdeadbeef, got %x\n", GetLastError());
|
||||
+ ok(checksum_orig != 0xdeadbeef, "Expected orig checksum != 0xdeadbeef\n");
|
||||
+ ok(checksum_new != 0xdeadbeef, "Expected new checksum != 0xdeadbeef\n");
|
||||
+
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile((char *)modinfo.lpBaseOfDll + 100, modinfo.SizeOfImage - 100,
|
||||
+ &checksum_orig, &checksum_new);
|
||||
+ ok(!ret, "Expected CheckSumMappedFile to fail, got %p\n", ret);
|
||||
+ ok(GetLastError() == 0xdeadbeef, "Expected err=0xdeadbeef, got %x\n", GetLastError());
|
||||
+ ok(checksum_orig == 0, "Expected 0xdeadbeef, got %x\n", checksum_orig);
|
||||
+ ok(checksum_new != 0 && checksum_new != 0xdeadbeef, "Got unexpected value %x\n", checksum_new);
|
||||
+
|
||||
+ checksum_off = _get_checksum_offset(modinfo.lpBaseOfDll, &nt_header, &checksum_correct);
|
||||
+ ok(checksum_off != 0, "Failed to get checksum offset\n");
|
||||
+
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile(modinfo.lpBaseOfDll, checksum_off, &checksum_orig, &checksum_new);
|
||||
+ ok(ret == nt_header, "Expected %p, got %p\n", nt_header, ret);
|
||||
+ ok(checksum_orig == checksum_correct, "Expected %x, got %x\n", checksum_correct, checksum_orig);
|
||||
+ ok(checksum_new != 0 && checksum_new != 0xdeadbeef, "Got unexpected value %x\n", checksum_new);
|
||||
+
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile(modinfo.lpBaseOfDll, (char *)nt_header - (char *)modinfo.lpBaseOfDll,
|
||||
+ &checksum_orig, &checksum_new);
|
||||
+ ok(ret == nt_header, "Expected %p, got %p\n", nt_header, ret);
|
||||
+ ok(checksum_orig == checksum_correct, "Expected %x, got %x\n", checksum_correct, checksum_orig);
|
||||
+ ok(checksum_new != 0 && checksum_new != 0xdeadbeef, "Got unexpected value %x\n", checksum_new);
|
||||
+
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile(modinfo.lpBaseOfDll, sizeof(IMAGE_DOS_HEADER),
|
||||
+ &checksum_orig, &checksum_new);
|
||||
+ ok(ret == nt_header, "Expected %p, got %p\n", nt_header, ret);
|
||||
+ ok(checksum_orig == checksum_correct, "Expected %x, got %x\n", checksum_correct, checksum_orig);
|
||||
+ ok(checksum_new != 0 && checksum_new != 0xdeadbeef, "Got unexpected value %x\n", checksum_new);
|
||||
+
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile(modinfo.lpBaseOfDll, 0, &checksum_orig, &checksum_new);
|
||||
+ ok(ret == nt_header, "Expected %p, got %p\n", nt_header, ret);
|
||||
+ ok(checksum_orig == checksum_correct, "Expected %x, got %x\n", checksum_correct, checksum_orig);
|
||||
+ todo_wine ok(checksum_new != 0 && checksum_new != 0xdeadbeef, "Got unexpected value %x\n", checksum_new);
|
||||
+
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile((char *)modinfo.lpBaseOfDll + 1, 0,
|
||||
+ &checksum_orig, &checksum_new);
|
||||
+ ok(ret == NULL, "Expected NULL, got %p\n", ret);
|
||||
+ ok(checksum_orig == 0, "Expected 0, got %x\n", checksum_orig);
|
||||
+ ok(checksum_new == 0, "Expected 0, got %x\n", checksum_new);
|
||||
+
|
||||
+ quartz_data = LoadLibraryExA("quartz.dll", NULL, LOAD_LIBRARY_AS_DATAFILE);
|
||||
+ if (!quartz_data)
|
||||
+ {
|
||||
+ skip("Failed to load quartz as datafile, skipping tests\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ quartz_base = (char *)((DWORD_PTR)quartz_data & ~1);
|
||||
+ checksum_off = _get_checksum_offset(quartz_base, &nt_header, &checksum_correct);
|
||||
+ ok(checksum_off != 0, "Failed to get checksum offset\n");
|
||||
+
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile(quartz_base, checksum_off, &checksum_orig, &checksum_new);
|
||||
+ ok(ret == nt_header, "Expected %p, got %p\n", nt_header, ret);
|
||||
+ ok(checksum_orig == checksum_correct, "Expected %x, got %x\n", checksum_correct, checksum_orig);
|
||||
+ ok(checksum_new != 0 && checksum_new != 0xdeadbeef, "Got unexpected value %x\n", checksum_new);
|
||||
+
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile(quartz_base, (char *)nt_header - quartz_base,
|
||||
+ &checksum_orig, &checksum_new);
|
||||
+ ok(ret == nt_header, "Expected %p, got %p\n", nt_header, ret);
|
||||
+ ok(checksum_orig == checksum_correct, "Expected %x, got %x\n", checksum_correct, checksum_orig);
|
||||
+ ok(checksum_new != 0 && checksum_new != 0xdeadbeef, "Got unexpected value %x\n", checksum_new);
|
||||
+
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile(quartz_base, sizeof(IMAGE_DOS_HEADER), &checksum_orig, &checksum_new);
|
||||
+ ok(ret == nt_header, "Expected %p, got %p\n", nt_header, ret);
|
||||
+ ok(checksum_orig == checksum_correct, "Expected %x, got %x\n", checksum_correct, checksum_orig);
|
||||
+ ok(checksum_new != 0 && checksum_new != 0xdeadbeef, "Got unexpected value %x\n", checksum_new);
|
||||
+
|
||||
+ checksum_orig = checksum_new = 0xdeadbeef;
|
||||
+ ret = pCheckSumMappedFile(quartz_base, 0, &checksum_orig, &checksum_new);
|
||||
+ ok(ret == nt_header, "Expected %p, got %p\n", nt_header, ret);
|
||||
+ ok(checksum_orig == checksum_correct, "Expected %x, got %x\n", checksum_correct, checksum_orig);
|
||||
+ todo_wine ok(checksum_new != 0 && checksum_new != 0xdeadbeef, "Got unexpected value %x\n", checksum_new);
|
||||
+
|
||||
+ FreeLibrary(quartz_data);
|
||||
+}
|
||||
+
|
||||
START_TEST(integrity)
|
||||
{
|
||||
DWORD file_size, file_size_orig, first, second;
|
||||
@@ -273,6 +515,11 @@ START_TEST(integrity)
|
||||
pImageGetCertificateData = (void *) GetProcAddress(hImageHlp, "ImageGetCertificateData");
|
||||
pImageGetCertificateHeader = (void *) GetProcAddress(hImageHlp, "ImageGetCertificateHeader");
|
||||
pImageRemoveCertificate = (void *) GetProcAddress(hImageHlp, "ImageRemoveCertificate");
|
||||
+ pCheckSumMappedFile = (void *) GetProcAddress(hImageHlp, "CheckSumMappedFile");
|
||||
+
|
||||
+ hPsapi = LoadLibraryA("psapi.dll");
|
||||
+ if (hPsapi)
|
||||
+ pGetModuleInformation = (void *) GetProcAddress(hPsapi, "GetModuleInformation");
|
||||
|
||||
first = test_add_certificate(test_cert_data, sizeof(test_cert_data));
|
||||
test_get_certificate(test_cert_data, first);
|
||||
@@ -299,6 +546,9 @@ START_TEST(integrity)
|
||||
file_size = get_file_size();
|
||||
ok(file_size == file_size_orig, "File size different after add and remove (old: %d; new: %d)\n", file_size_orig, file_size);
|
||||
|
||||
+ test_pe_checksum();
|
||||
+
|
||||
+ if (hPsapi) FreeLibrary(hPsapi);
|
||||
FreeLibrary(hImageHlp);
|
||||
DeleteFileA(test_dll_path);
|
||||
}
|
||||
--
|
||||
2.5.0
|
||||
|
@ -0,0 +1,84 @@
|
||||
From 2255200233c348e56b17330c4836c34e3e6b7854 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 11 Aug 2015 02:46:06 +0200
|
||||
Subject: imagehlp: Fix checksum calculation for odd sizes.
|
||||
|
||||
---
|
||||
dlls/imagehlp/modify.c | 39 +++++++++++++++++++--------------------
|
||||
dlls/imagehlp/tests/integrity.c | 2 +-
|
||||
2 files changed, 20 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/dlls/imagehlp/modify.c b/dlls/imagehlp/modify.c
|
||||
index aa29ca7..2a0214b 100644
|
||||
--- a/dlls/imagehlp/modify.c
|
||||
+++ b/dlls/imagehlp/modify.c
|
||||
@@ -60,26 +60,25 @@ BOOL WINAPI BindImageEx(
|
||||
/***********************************************************************
|
||||
* CheckSum (internal)
|
||||
*/
|
||||
-static WORD CalcCheckSum(
|
||||
- DWORD StartValue, LPVOID BaseAddress, DWORD WordCount)
|
||||
+static WORD CalcCheckSum(DWORD StartValue, LPVOID BaseAddress, DWORD ByteCount)
|
||||
{
|
||||
- LPWORD Ptr;
|
||||
- DWORD Sum;
|
||||
- DWORD i;
|
||||
-
|
||||
- Sum = StartValue;
|
||||
- Ptr = (LPWORD)BaseAddress;
|
||||
- for (i = 0; i < WordCount; i++)
|
||||
- {
|
||||
- Sum += *Ptr;
|
||||
- if (HIWORD(Sum) != 0)
|
||||
- {
|
||||
- Sum = LOWORD(Sum) + HIWORD(Sum);
|
||||
- }
|
||||
- Ptr++;
|
||||
- }
|
||||
-
|
||||
- return (WORD)(LOWORD(Sum) + HIWORD(Sum));
|
||||
+ LPWORD Ptr;
|
||||
+ DWORD Sum, i;
|
||||
+
|
||||
+ Sum = StartValue;
|
||||
+ Ptr = (LPWORD)BaseAddress;
|
||||
+ for (i = ByteCount; i > 1; i -= 2)
|
||||
+ {
|
||||
+ Sum += *Ptr;
|
||||
+ if (HIWORD(Sum) != 0)
|
||||
+ Sum = LOWORD(Sum) + HIWORD(Sum);
|
||||
+ Ptr++;
|
||||
+ }
|
||||
+
|
||||
+ if (i == 1)
|
||||
+ Sum += *(BYTE *)Ptr;
|
||||
+
|
||||
+ return (WORD)(LOWORD(Sum) + HIWORD(Sum));
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +101,7 @@ PIMAGE_NT_HEADERS WINAPI CheckSumMappedFile(
|
||||
BaseAddress, FileLength, HeaderSum, CheckSum
|
||||
);
|
||||
|
||||
- CalcSum = (DWORD)CalcCheckSum(0, BaseAddress, (FileLength + 1) / sizeof(WORD));
|
||||
+ CalcSum = (DWORD)CalcCheckSum(0, BaseAddress, FileLength);
|
||||
|
||||
__TRY
|
||||
{
|
||||
diff --git a/dlls/imagehlp/tests/integrity.c b/dlls/imagehlp/tests/integrity.c
|
||||
index 7dd8ff4..913c396 100644
|
||||
--- a/dlls/imagehlp/tests/integrity.c
|
||||
+++ b/dlls/imagehlp/tests/integrity.c
|
||||
@@ -362,7 +362,7 @@ static void test_pe_checksum(void)
|
||||
ret = pCheckSumMappedFile(buffer, 11, &checksum_orig, &checksum_new);
|
||||
ok(ret == NULL, "Expected NULL, got %p\n", ret);
|
||||
ok(checksum_orig == 0, "Expected 0, got %x\n", checksum_orig);
|
||||
- todo_wine ok(checksum_new == 0xaad7, "Expected 0xaad7, got %x\n", checksum_new);
|
||||
+ ok(checksum_new == 0xaad7, "Expected 0xaad7, got %x\n", checksum_new);
|
||||
|
||||
/* test checksum of PE module */
|
||||
memset(buffer, 0x22, sizeof(buffer));
|
||||
--
|
||||
2.5.0
|
||||
|
@ -0,0 +1,40 @@
|
||||
From 7148e6c97c72c999f56f811d2501b7bfc90fac5a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 11 Aug 2015 03:42:07 +0200
|
||||
Subject: imagehlp: Remove unused structure.
|
||||
|
||||
---
|
||||
dlls/imagehlp/access.c | 17 -----------------
|
||||
1 file changed, 17 deletions(-)
|
||||
|
||||
diff --git a/dlls/imagehlp/access.c b/dlls/imagehlp/access.c
|
||||
index 9e1f187..6a33c0c 100644
|
||||
--- a/dlls/imagehlp/access.c
|
||||
+++ b/dlls/imagehlp/access.c
|
||||
@@ -36,23 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(imagehlp);
|
||||
|
||||
static PLOADED_IMAGE IMAGEHLP_pFirstLoadedImage=NULL;
|
||||
|
||||
-static LOADED_IMAGE IMAGEHLP_EmptyLoadedImage = {
|
||||
- NULL, /* ModuleName */
|
||||
- 0, /* hFile */
|
||||
- NULL, /* MappedAddress */
|
||||
- NULL, /* FileHeader */
|
||||
- NULL, /* LastRvaSection */
|
||||
- 0, /* NumberOfSections */
|
||||
- NULL, /* Sections */
|
||||
- 1, /* Characteristics */
|
||||
- FALSE, /* fSystemImage */
|
||||
- FALSE, /* fDOSImage */
|
||||
- FALSE, /* fReadOnly */
|
||||
- 0, /* Version */
|
||||
- { &IMAGEHLP_EmptyLoadedImage.Links, &IMAGEHLP_EmptyLoadedImage.Links }, /* Links */
|
||||
- 148, /* SizeOfImage; */
|
||||
-};
|
||||
-
|
||||
DECLSPEC_HIDDEN extern HANDLE IMAGEHLP_hHeap;
|
||||
|
||||
/***********************************************************************
|
||||
--
|
||||
2.5.0
|
||||
|
@ -0,0 +1,131 @@
|
||||
From 9156b97f5aab56ae2ab8b981b625bd46e1ef2056 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 11 Aug 2015 04:35:45 +0200
|
||||
Subject: imagehlp: Implement ImageLoad and cleanup ImageUnload.
|
||||
|
||||
---
|
||||
dlls/imagehlp/access.c | 85 ++++++++++++++++++++++++++++----------------------
|
||||
1 file changed, 48 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/dlls/imagehlp/access.c b/dlls/imagehlp/access.c
|
||||
index 6a33c0c..897f2d5 100644
|
||||
--- a/dlls/imagehlp/access.c
|
||||
+++ b/dlls/imagehlp/access.c
|
||||
@@ -33,8 +33,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(imagehlp);
|
||||
/***********************************************************************
|
||||
* Data
|
||||
*/
|
||||
-
|
||||
-static PLOADED_IMAGE IMAGEHLP_pFirstLoadedImage=NULL;
|
||||
+LIST_ENTRY image_list = { &image_list, &image_list };
|
||||
|
||||
DECLSPEC_HIDDEN extern HANDLE IMAGEHLP_hHeap;
|
||||
|
||||
@@ -69,57 +68,69 @@ DWORD WINAPI GetImageUnusedHeaderBytes(
|
||||
/***********************************************************************
|
||||
* ImageLoad (IMAGEHLP.@)
|
||||
*/
|
||||
-PLOADED_IMAGE WINAPI ImageLoad(PCSTR DllName, PCSTR DllPath)
|
||||
+PLOADED_IMAGE WINAPI ImageLoad(PCSTR dll_name, PCSTR dll_path)
|
||||
{
|
||||
- PLOADED_IMAGE pLoadedImage;
|
||||
-
|
||||
- FIXME("(%s, %s): stub\n", DllName, DllPath);
|
||||
-
|
||||
- pLoadedImage = HeapAlloc(IMAGEHLP_hHeap, 0, sizeof(LOADED_IMAGE));
|
||||
- if (pLoadedImage)
|
||||
- pLoadedImage->FileHeader = HeapAlloc(IMAGEHLP_hHeap, 0, sizeof(IMAGE_NT_HEADERS));
|
||||
-
|
||||
- return pLoadedImage;
|
||||
+ LOADED_IMAGE *image;
|
||||
+
|
||||
+ TRACE("(%s, %s)\n", dll_name, dll_path);
|
||||
+
|
||||
+ image = HeapAlloc(IMAGEHLP_hHeap, 0, sizeof(*image));
|
||||
+ if (!image) return NULL;
|
||||
+
|
||||
+ if (!MapAndLoad(dll_name, dll_path, image, TRUE, TRUE))
|
||||
+ {
|
||||
+ HeapFree(IMAGEHLP_hHeap, 0, image);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ image->Links.Flink = image_list.Flink;
|
||||
+ image->Links.Blink = &image_list;
|
||||
+ image_list.Flink->Blink = &image->Links;
|
||||
+ image_list.Flink = &image->Links;
|
||||
+
|
||||
+ return image;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* ImageUnload (IMAGEHLP.@)
|
||||
*/
|
||||
-BOOL WINAPI ImageUnload(PLOADED_IMAGE pLoadedImage)
|
||||
+BOOL WINAPI ImageUnload(PLOADED_IMAGE loaded_image)
|
||||
{
|
||||
- LIST_ENTRY *pCurrent, *pFind;
|
||||
+ LIST_ENTRY *entry, *mark;
|
||||
+ PLOADED_IMAGE image;
|
||||
+
|
||||
+ FIXME("(%p)\n", loaded_image);
|
||||
|
||||
- TRACE("(%p)\n", pLoadedImage);
|
||||
-
|
||||
- if(!IMAGEHLP_pFirstLoadedImage || !pLoadedImage)
|
||||
+ if (!loaded_image)
|
||||
{
|
||||
- /* No image loaded or null pointer */
|
||||
- SetLastError(ERROR_INVALID_PARAMETER);
|
||||
- return FALSE;
|
||||
+ /* No image loaded or null pointer */
|
||||
+ SetLastError(ERROR_INVALID_PARAMETER);
|
||||
+ return FALSE;
|
||||
}
|
||||
|
||||
- pFind=&pLoadedImage->Links;
|
||||
- pCurrent=&IMAGEHLP_pFirstLoadedImage->Links;
|
||||
- while((pCurrent != pFind) &&
|
||||
- (pCurrent != NULL))
|
||||
- pCurrent = pCurrent->Flink;
|
||||
- if(!pCurrent)
|
||||
+ /* FIXME: do we really need to check this? */
|
||||
+ mark = &image_list;
|
||||
+ for (entry = mark->Flink; entry != mark; entry = entry->Flink)
|
||||
{
|
||||
- /* Not found */
|
||||
- SetLastError(ERROR_INVALID_PARAMETER);
|
||||
- return FALSE;
|
||||
+ image = CONTAINING_RECORD(entry, LOADED_IMAGE, Links);
|
||||
+ if (image == loaded_image)
|
||||
+ break;
|
||||
}
|
||||
|
||||
- if(pCurrent->Blink)
|
||||
- pCurrent->Blink->Flink = pCurrent->Flink;
|
||||
- else
|
||||
- IMAGEHLP_pFirstLoadedImage = pCurrent->Flink?CONTAINING_RECORD(
|
||||
- pCurrent->Flink, LOADED_IMAGE, Links):NULL;
|
||||
+ if (entry == mark)
|
||||
+ {
|
||||
+ /* Not found */
|
||||
+ SetLastError(ERROR_INVALID_PARAMETER);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
|
||||
- if(pCurrent->Flink)
|
||||
- pCurrent->Flink->Blink = pCurrent->Blink;
|
||||
+ entry->Blink->Flink = entry->Flink;
|
||||
+ entry->Flink->Blink = entry->Blink;
|
||||
|
||||
- return FALSE;
|
||||
+ UnMapAndLoad(loaded_image);
|
||||
+ HeapFree(IMAGEHLP_hHeap, 0, loaded_image);
|
||||
+
|
||||
+ return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
--
|
||||
2.5.0
|
||||
|
2
patches/imagehlp-Cleanup/definition
Normal file
2
patches/imagehlp-Cleanup/definition
Normal file
@ -0,0 +1,2 @@
|
||||
Fixes: Catch invalid memory accesses in imagehlp.CheckSumMappedFile
|
||||
Fixes: Properly implement imagehlp.ImageLoad and ImageUnload
|
@ -128,6 +128,7 @@ patch_enable_all ()
|
||||
enable_gdiplus_GdipCreateEffect="$1"
|
||||
enable_ieframe_IViewObject_Draw="$1"
|
||||
enable_imagehlp_BindImageEx="$1"
|
||||
enable_imagehlp_Cleanup="$1"
|
||||
enable_imagehlp_ImageLoad="$1"
|
||||
enable_inetcpl_Default_Home="$1"
|
||||
enable_iphlpapi_System_Ping="$1"
|
||||
@ -467,6 +468,9 @@ patch_enable ()
|
||||
imagehlp-BindImageEx)
|
||||
enable_imagehlp_BindImageEx="$2"
|
||||
;;
|
||||
imagehlp-Cleanup)
|
||||
enable_imagehlp_Cleanup="$2"
|
||||
;;
|
||||
imagehlp-ImageLoad)
|
||||
enable_imagehlp_ImageLoad="$2"
|
||||
;;
|
||||
@ -2946,6 +2950,24 @@ if test "$enable_imagehlp_BindImageEx" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset imagehlp-Cleanup
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/imagehlp/access.c, dlls/imagehlp/modify.c, dlls/imagehlp/tests/integrity.c
|
||||
# |
|
||||
if test "$enable_imagehlp_Cleanup" -eq 1; then
|
||||
patch_apply imagehlp-Cleanup/0001-imagehlp-Catch-invalid-memory-access-in-CheckSumMapp.patch
|
||||
patch_apply imagehlp-Cleanup/0002-imagehlp-Fix-checksum-calculation-for-odd-sizes.patch
|
||||
patch_apply imagehlp-Cleanup/0003-imagehlp-Remove-unused-structure.patch
|
||||
patch_apply imagehlp-Cleanup/0004-imagehlp-Implement-ImageLoad-and-cleanup-ImageUnload.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "imagehlp: Catch invalid memory access in CheckSumMappedFile and add tests.", 1 },';
|
||||
echo '+ { "Michael Müller", "imagehlp: Fix checksum calculation for odd sizes.", 1 },';
|
||||
echo '+ { "Michael Müller", "imagehlp: Remove unused structure.", 1 },';
|
||||
echo '+ { "Michael Müller", "imagehlp: Implement ImageLoad and cleanup ImageUnload.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset imagehlp-ImageLoad
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -5037,18 +5059,18 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Geforce_425M
|
||||
# Patchset wined3d-Multisampling
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#35054] Add wined3d detection for GeForce GT 425M
|
||||
# | * [#12652] Allow to override number of quality levels for D3DMULTISAMPLE_NONMASKABLE.
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_private.h
|
||||
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_main.c, dlls/wined3d/wined3d_private.h
|
||||
# |
|
||||
if test "$enable_wined3d_Geforce_425M" -eq 1; then
|
||||
patch_apply wined3d-Geforce_425M/0001-wined3d-Add-detection-for-NVIDIA-GeForce-425M.patch
|
||||
if test "$enable_wined3d_Multisampling" -eq 1; then
|
||||
patch_apply wined3d-Multisampling/0001-wined3d-Allow-to-specify-multisampling-AA-quality-le.patch
|
||||
(
|
||||
echo '+ { "Jarkko Korpi", "wined3d: Add detection for NVIDIA GeForce 425M.", 1 },';
|
||||
echo '+ { "Austin English", "wined3d: Allow to specify multisampling AA quality levels via registry.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
@ -5109,6 +5131,21 @@ if test "$enable_wined3d_resource_check_usage" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Geforce_425M
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#35054] Add wined3d detection for GeForce GT 425M
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_private.h
|
||||
# |
|
||||
if test "$enable_wined3d_Geforce_425M" -eq 1; then
|
||||
patch_apply wined3d-Geforce_425M/0001-wined3d-Add-detection-for-NVIDIA-GeForce-425M.patch
|
||||
(
|
||||
echo '+ { "Jarkko Korpi", "wined3d: Add detection for NVIDIA GeForce 425M.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-wined3d_swapchain_present
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -5133,21 +5170,6 @@ if test "$enable_wined3d_MESA_GPU_Info" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Multisampling
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#12652] Allow to override number of quality levels for D3DMULTISAMPLE_NONMASKABLE.
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_main.c, dlls/wined3d/wined3d_private.h
|
||||
# |
|
||||
if test "$enable_wined3d_Multisampling" -eq 1; then
|
||||
patch_apply wined3d-Multisampling/0001-wined3d-Allow-to-specify-multisampling-AA-quality-le.patch
|
||||
(
|
||||
echo '+ { "Austin English", "wined3d: Allow to specify multisampling AA quality levels via registry.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-CSMT_Main
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user