mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Rebase against d07a7bbba51d6c40a5ed089ab9069451805928c2.
This commit is contained in:
parent
f3609f5452
commit
2ff3b662fc
@ -178,7 +178,7 @@ for more details.*
|
||||
* Implement FileNamesInformation class support for NtQueryDirectoryFile
|
||||
* Implement FolderImpl_Items and stubbed FolderItems interface
|
||||
* Implement ID3DXEffect::FindNextValidTechnique ([Wine Bug #34101](https://bugs.winehq.org/show_bug.cgi?id=34101))
|
||||
* Implement SystemHandleInformation info class
|
||||
* ~~Implement SystemHandleInformation info class~~
|
||||
* Implement a Courier New replacement font ([Wine Bug #20456](https://bugs.winehq.org/show_bug.cgi?id=20456))
|
||||
* Implement a Microsoft Yahei replacement font ([Wine Bug #13829](https://bugs.winehq.org/show_bug.cgi?id=13829))
|
||||
* Implement a Times New Roman replacement font ([Wine Bug #32342](https://bugs.winehq.org/show_bug.cgi?id=32342))
|
||||
@ -295,7 +295,7 @@ for more details.*
|
||||
* Support for setcap on wine-preloader ([Wine Bug #26256](https://bugs.winehq.org/show_bug.cgi?id=26256))
|
||||
* Support for shell32 file operation progress dialog
|
||||
* Support for stored file ACLs ([Wine Bug #33576](https://bugs.winehq.org/show_bug.cgi?id=33576))
|
||||
* SysAllocStringByteLen should align terminating null WCHAR
|
||||
* ~~SysAllocStringByteLen should align terminating null WCHAR~~
|
||||
* Tumblebugs 2 requires DXTn software encoding support ([Wine Bug #29586](https://bugs.winehq.org/show_bug.cgi?id=29586))
|
||||
* Update a XIM candidate position when cursor location changes ([Wine Bug #30938](https://bugs.winehq.org/show_bug.cgi?id=30938))
|
||||
* Use GLX_MESA_query_renderer extension to get more exact GPU infos
|
||||
|
@ -1,231 +0,0 @@
|
||||
From 1703d568d9756fbf3d6a11889386ff9355f33755 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 24 Dec 2015 13:08:50 +0100
|
||||
Subject: server: Implement wineserver call for SystemHandleInformation. (v2)
|
||||
|
||||
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
|
||||
---
|
||||
dlls/ntdll/nt.c | 49 ++++++++++++++++++++++++++++++++++++-------
|
||||
dlls/ntdll/tests/info.c | 10 ++++-----
|
||||
server/handle.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
server/protocol.def | 16 ++++++++++++++
|
||||
server/trace.c | 17 +++++++++++++++
|
||||
5 files changed, 135 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
|
||||
index 8ea1ddd..55255a8 100644
|
||||
--- a/dlls/ntdll/nt.c
|
||||
+++ b/dlls/ntdll/nt.c
|
||||
@@ -2004,18 +2004,51 @@ NTSTATUS WINAPI NtQuerySystemInformation(
|
||||
break;
|
||||
case SystemHandleInformation:
|
||||
{
|
||||
- SYSTEM_HANDLE_INFORMATION shi;
|
||||
+ struct handle_info *info;
|
||||
+ DWORD i, num_handles;
|
||||
|
||||
- memset(&shi, 0, sizeof(shi));
|
||||
- len = sizeof(shi);
|
||||
+ if (Length < sizeof(SYSTEM_HANDLE_INFORMATION))
|
||||
+ {
|
||||
+ ret = STATUS_INFO_LENGTH_MISMATCH;
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
- if ( Length >= len)
|
||||
+ if (!SystemInformation)
|
||||
{
|
||||
- if (!SystemInformation) ret = STATUS_ACCESS_VIOLATION;
|
||||
- else memcpy( SystemInformation, &shi, len);
|
||||
+ ret = STATUS_ACCESS_VIOLATION;
|
||||
+ break;
|
||||
}
|
||||
- else ret = STATUS_INFO_LENGTH_MISMATCH;
|
||||
- FIXME("info_class SYSTEM_HANDLE_INFORMATION\n");
|
||||
+
|
||||
+ num_handles = (Length - FIELD_OFFSET( SYSTEM_HANDLE_INFORMATION, Handle )) / sizeof(SYSTEM_HANDLE_ENTRY);
|
||||
+ if (!(info = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(*info) * num_handles )))
|
||||
+ return STATUS_NO_MEMORY;
|
||||
+
|
||||
+ SERVER_START_REQ( get_system_handles )
|
||||
+ {
|
||||
+ wine_server_set_reply( req, info, sizeof(*info) * num_handles );
|
||||
+ if (!(ret = wine_server_call( req )))
|
||||
+ {
|
||||
+ SYSTEM_HANDLE_INFORMATION *shi = SystemInformation;
|
||||
+ shi->Count = wine_server_reply_size( req ) / sizeof(*info);
|
||||
+ len = FIELD_OFFSET( SYSTEM_HANDLE_INFORMATION, Handle[shi->Count] );
|
||||
+ for (i = 0; i < shi->Count; i++)
|
||||
+ {
|
||||
+ memset( &shi->Handle[i], 0, sizeof(shi->Handle[i]) );
|
||||
+ shi->Handle[i].OwnerPid = info[i].owner;
|
||||
+ shi->Handle[i].HandleValue = info[i].handle;
|
||||
+ shi->Handle[i].AccessMask = info[i].access;
|
||||
+ /* FIXME: Fill out ObjectType, HandleFlags, ObjectPointer */
|
||||
+ }
|
||||
+ }
|
||||
+ else if (ret == STATUS_BUFFER_TOO_SMALL)
|
||||
+ {
|
||||
+ len = FIELD_OFFSET( SYSTEM_HANDLE_INFORMATION, Handle[reply->count] );
|
||||
+ ret = STATUS_INFO_LENGTH_MISMATCH;
|
||||
+ }
|
||||
+ }
|
||||
+ SERVER_END_REQ;
|
||||
+
|
||||
+ RtlFreeHeap( GetProcessHeap(), 0, info );
|
||||
}
|
||||
break;
|
||||
case SystemCacheInformation:
|
||||
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
|
||||
index 3219dbb..da509aa 100644
|
||||
--- a/dlls/ntdll/tests/info.c
|
||||
+++ b/dlls/ntdll/tests/info.c
|
||||
@@ -487,7 +487,7 @@ static void test_query_handle(void)
|
||||
/* Request the needed length : a SystemInformationLength greater than one struct sets ReturnLength */
|
||||
ReturnLength = 0xdeadbeef;
|
||||
status = pNtQuerySystemInformation(SystemHandleInformation, shi, SystemInformationLength, &ReturnLength);
|
||||
- todo_wine ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status);
|
||||
+ ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status);
|
||||
ok( ReturnLength != 0xdeadbeef, "Expected valid ReturnLength\n" );
|
||||
|
||||
SystemInformationLength = ReturnLength;
|
||||
@@ -503,13 +503,13 @@ static void test_query_handle(void)
|
||||
}
|
||||
ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status );
|
||||
ExpectedLength = FIELD_OFFSET(SYSTEM_HANDLE_INFORMATION, Handle[shi->Count]);
|
||||
- todo_wine ok( ReturnLength == ExpectedLength || broken(ReturnLength == ExpectedLength - sizeof(DWORD)), /* Vista / 2008 */
|
||||
- "Expected length %u, got %u\n", ExpectedLength, ReturnLength );
|
||||
- todo_wine ok( shi->Count > 1, "Expected more than 1 handle, got %u\n", shi->Count );
|
||||
+ ok( ReturnLength == ExpectedLength || broken(ReturnLength == ExpectedLength - sizeof(DWORD)), /* Vista / 2008 */
|
||||
+ "Expected length %u, got %u\n", ExpectedLength, ReturnLength );
|
||||
+ ok( shi->Count > 1, "Expected more than 1 handle, got %u\n", shi->Count );
|
||||
for (i = 0, found = FALSE; i < shi->Count && !found; i++)
|
||||
found = (shi->Handle[i].OwnerPid == GetCurrentProcessId()) &&
|
||||
((HANDLE)(ULONG_PTR)shi->Handle[i].HandleValue == EventHandle);
|
||||
- todo_wine ok( found, "Expected to find event handle in handle list\n" );
|
||||
+ ok( found, "Expected to find event handle in handle list\n" );
|
||||
|
||||
CloseHandle(EventHandle);
|
||||
|
||||
diff --git a/server/handle.c b/server/handle.c
|
||||
index 5043ff7..05d71ba 100644
|
||||
--- a/server/handle.c
|
||||
+++ b/server/handle.c
|
||||
@@ -745,3 +745,59 @@ DECL_HANDLER(get_security_object)
|
||||
|
||||
release_object( obj );
|
||||
}
|
||||
+
|
||||
+struct enum_handle_info
|
||||
+{
|
||||
+ unsigned int count;
|
||||
+ struct handle_info *handle;
|
||||
+};
|
||||
+
|
||||
+static int enum_handles( struct process *process, void *user )
|
||||
+{
|
||||
+ struct enum_handle_info *info = user;
|
||||
+ struct handle_table *table = process->handles;
|
||||
+ struct handle_entry *entry;
|
||||
+ struct handle_info *handle;
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ if (!table)
|
||||
+ return 0;
|
||||
+
|
||||
+ for (i = 0, entry = table->entries; i <= table->last; i++, entry++)
|
||||
+ {
|
||||
+ if (!entry->ptr) continue;
|
||||
+ if (!info->handle)
|
||||
+ {
|
||||
+ info->count++;
|
||||
+ continue;
|
||||
+ }
|
||||
+ assert( info->count );
|
||||
+ handle = info->handle++;
|
||||
+ handle->owner = process->id;
|
||||
+ handle->handle = index_to_handle(i);
|
||||
+ handle->access = entry->access & ~RESERVED_ALL;
|
||||
+ info->count--;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+DECL_HANDLER(get_system_handles)
|
||||
+{
|
||||
+ struct enum_handle_info info;
|
||||
+ struct handle_info *handle;
|
||||
+ data_size_t max_handles = get_reply_max_size() / sizeof(*handle);
|
||||
+
|
||||
+ info.handle = NULL;
|
||||
+ info.count = 0;
|
||||
+ enum_processes( enum_handles, &info );
|
||||
+ reply->count = info.count;
|
||||
+
|
||||
+ if (max_handles < info.count)
|
||||
+ set_error( STATUS_BUFFER_TOO_SMALL );
|
||||
+ else if ((handle = set_reply_data_size( info.count * sizeof(*handle) )))
|
||||
+ {
|
||||
+ info.handle = handle;
|
||||
+ enum_processes( enum_handles, &info );
|
||||
+ }
|
||||
+}
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index bfb9089..ea5bd61 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3266,6 +3266,22 @@ enum coords_relative
|
||||
VARARG(sd,security_descriptor); /* retrieved security descriptor */
|
||||
@END
|
||||
|
||||
+
|
||||
+struct handle_info
|
||||
+{
|
||||
+ process_id_t owner;
|
||||
+ obj_handle_t handle;
|
||||
+ unsigned int access;
|
||||
+};
|
||||
+
|
||||
+/* Return a list of all opened handles */
|
||||
+@REQ(get_system_handles)
|
||||
+@REPLY
|
||||
+ unsigned int count; /* number of handles */
|
||||
+ VARARG(data,handle_infos); /* array of handle_infos */
|
||||
+@END
|
||||
+
|
||||
+
|
||||
/* Create a mailslot */
|
||||
@REQ(create_mailslot)
|
||||
unsigned int access; /* wanted access rights */
|
||||
diff --git a/server/trace.c b/server/trace.c
|
||||
index 405a1c9..8a26fdb 100644
|
||||
--- a/server/trace.c
|
||||
+++ b/server/trace.c
|
||||
@@ -1142,6 +1142,23 @@ static void dump_varargs_rawinput_devices(const char *prefix, data_size_t size )
|
||||
fputc( '}', stderr );
|
||||
}
|
||||
|
||||
+static void dump_varargs_handle_infos( const char *prefix, data_size_t size )
|
||||
+{
|
||||
+ const struct handle_info *handle;
|
||||
+
|
||||
+ fprintf( stderr, "%s{", prefix );
|
||||
+ while (size >= sizeof(*handle))
|
||||
+ {
|
||||
+ handle = cur_data;
|
||||
+ fprintf( stderr, "{owner=%04x,handle=%04x,access=%08x}",
|
||||
+ handle->owner, handle->handle, handle->access );
|
||||
+ size -= sizeof(*handle);
|
||||
+ remove_data( sizeof(*handle) );
|
||||
+ if (size) fputc( ',', stderr );
|
||||
+ }
|
||||
+ fputc( '}', stderr );
|
||||
+}
|
||||
+
|
||||
typedef void (*dump_func)( const void *req );
|
||||
|
||||
/* Everything below this line is generated automatically by tools/make_requests */
|
||||
--
|
||||
2.6.4
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: Implement SystemHandleInformation info class
|
@ -1,52 +0,0 @@
|
||||
From 58ca159c89e1eb626f287a37320369df5f8ba98e Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 25 Dec 2015 06:37:44 +0100
|
||||
Subject: oleaut32: Pass size without terminating null to get_cache_entry.
|
||||
|
||||
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
|
||||
---
|
||||
dlls/oleaut32/oleaut.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c
|
||||
index 0352215..75f9cb4 100644
|
||||
--- a/dlls/oleaut32/oleaut.c
|
||||
+++ b/dlls/oleaut32/oleaut.c
|
||||
@@ -119,7 +119,7 @@ static inline bstr_t *bstr_from_str(BSTR str)
|
||||
|
||||
static inline bstr_cache_entry_t *get_cache_entry(size_t size)
|
||||
{
|
||||
- unsigned cache_idx = FIELD_OFFSET(bstr_t, u.ptr[size-1])/BUCKET_SIZE;
|
||||
+ unsigned cache_idx = FIELD_OFFSET(bstr_t, u.ptr[size+sizeof(WCHAR)-1])/BUCKET_SIZE;
|
||||
return bstr_cache_enabled && cache_idx < sizeof(bstr_cache)/sizeof(*bstr_cache)
|
||||
? bstr_cache + cache_idx
|
||||
: NULL;
|
||||
@@ -127,14 +127,14 @@ static inline bstr_cache_entry_t *get_cache_entry(size_t size)
|
||||
|
||||
static bstr_t *alloc_bstr(size_t size)
|
||||
{
|
||||
- bstr_cache_entry_t *cache_entry = get_cache_entry(size+sizeof(WCHAR));
|
||||
+ bstr_cache_entry_t *cache_entry = get_cache_entry(size);
|
||||
bstr_t *ret;
|
||||
|
||||
if(cache_entry) {
|
||||
EnterCriticalSection(&cs_bstr_cache);
|
||||
|
||||
if(!cache_entry->cnt) {
|
||||
- cache_entry = get_cache_entry(size+sizeof(WCHAR)+BUCKET_SIZE);
|
||||
+ cache_entry = get_cache_entry(size+BUCKET_SIZE);
|
||||
if(cache_entry && !cache_entry->cnt)
|
||||
cache_entry = NULL;
|
||||
}
|
||||
@@ -258,7 +258,7 @@ void WINAPI SysFreeString(BSTR str)
|
||||
return;
|
||||
|
||||
bstr = bstr_from_str(str);
|
||||
- cache_entry = get_cache_entry(bstr->size+sizeof(WCHAR));
|
||||
+ cache_entry = get_cache_entry(bstr->size);
|
||||
if(cache_entry) {
|
||||
unsigned i;
|
||||
|
||||
--
|
||||
2.6.4
|
||||
|
@ -1,103 +0,0 @@
|
||||
From cd1a0baf46ef8d3394fbd7ba220d850a372c172a Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 25 Dec 2015 06:38:10 +0100
|
||||
Subject: oleaut32: Align terminating null character in SysAllocStringByteLen.
|
||||
|
||||
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
|
||||
---
|
||||
dlls/oleaut32/oleaut.c | 14 ++++++--------
|
||||
dlls/oleaut32/tests/vartype.c | 29 +++++++++++++++++++++++++++++
|
||||
2 files changed, 35 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c
|
||||
index 75f9cb4..78cb083 100644
|
||||
--- a/dlls/oleaut32/oleaut.c
|
||||
+++ b/dlls/oleaut32/oleaut.c
|
||||
@@ -149,12 +149,9 @@ static bstr_t *alloc_bstr(size_t size)
|
||||
|
||||
if(cache_entry) {
|
||||
if(WARN_ON(heap)) {
|
||||
- size_t tail;
|
||||
-
|
||||
- memset(ret, ARENA_INUSE_FILLER, FIELD_OFFSET(bstr_t, u.ptr[size+sizeof(WCHAR)]));
|
||||
- tail = bstr_alloc_size(size) - FIELD_OFFSET(bstr_t, u.ptr[size+sizeof(WCHAR)]);
|
||||
- if(tail)
|
||||
- memset(ret->u.ptr+size+sizeof(WCHAR), ARENA_TAIL_FILLER, tail);
|
||||
+ size_t fill_size = (FIELD_OFFSET(bstr_t, u.ptr[size])+2*sizeof(WCHAR)-1) & ~(sizeof(WCHAR)-1);
|
||||
+ memset(ret, ARENA_INUSE_FILLER, fill_size);
|
||||
+ memset((char *)ret+fill_size, ARENA_TAIL_FILLER, bstr_alloc_size(size)-fill_size);
|
||||
}
|
||||
ret->size = size;
|
||||
return ret;
|
||||
@@ -418,10 +415,11 @@ BSTR WINAPI SysAllocStringByteLen(LPCSTR str, UINT len)
|
||||
|
||||
if(str) {
|
||||
memcpy(bstr->u.ptr, str, len);
|
||||
- bstr->u.ptr[len] = bstr->u.ptr[len+1] = 0;
|
||||
+ bstr->u.ptr[len] = 0;
|
||||
}else {
|
||||
- memset(bstr->u.ptr, 0, len+sizeof(WCHAR));
|
||||
+ memset(bstr->u.ptr, 0, len+1);
|
||||
}
|
||||
+ bstr->u.str[(len+sizeof(WCHAR)-1)/sizeof(WCHAR)] = 0;
|
||||
|
||||
return bstr->u.str;
|
||||
}
|
||||
diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c
|
||||
index 7cbb059..d905d37 100644
|
||||
--- a/dlls/oleaut32/tests/vartype.c
|
||||
+++ b/dlls/oleaut32/tests/vartype.c
|
||||
@@ -5444,7 +5444,9 @@ static void test_SysAllocStringByteLen(void)
|
||||
{
|
||||
const OLECHAR szTest[10] = { 'T','e','s','t','\0' };
|
||||
const CHAR szTestA[6] = { 'T','e','s','t','\0','?' };
|
||||
+ char *buf;
|
||||
BSTR str;
|
||||
+ int i;
|
||||
|
||||
if (sizeof(void *) == 4) /* not limited to 0x80000000 on Win64 */
|
||||
{
|
||||
@@ -5487,6 +5489,7 @@ static void test_SysAllocStringByteLen(void)
|
||||
|
||||
ok (bstr->dwLen == 3, "Expected 3, got %d\n", bstr->dwLen);
|
||||
ok (!lstrcmpA((LPCSTR)bstr->szString, szTestTruncA), "String different\n");
|
||||
+ ok (!bstr->szString[2], "String not terminated\n");
|
||||
SysFreeString(str);
|
||||
}
|
||||
|
||||
@@ -5500,6 +5503,32 @@ static void test_SysAllocStringByteLen(void)
|
||||
ok (!lstrcmpW(bstr->szString, szTest), "String different\n");
|
||||
SysFreeString(str);
|
||||
}
|
||||
+
|
||||
+ /* Make sure terminating null is aligned properly */
|
||||
+ buf = HeapAlloc(GetProcessHeap(), 0, 1025);
|
||||
+ ok (buf != NULL, "Expected non-NULL\n");
|
||||
+ for (i = 0; i < 1024; i++)
|
||||
+ {
|
||||
+ LPINTERNAL_BSTR bstr;
|
||||
+
|
||||
+ str = SysAllocStringByteLen(NULL, i);
|
||||
+ ok (str != NULL, "Expected non-NULL\n");
|
||||
+ bstr = Get(str);
|
||||
+ ok (bstr->dwLen == i, "Expected %d, got %d\n", i, bstr->dwLen);
|
||||
+ ok (!bstr->szString[(i+sizeof(WCHAR)-1)/sizeof(WCHAR)], "String not terminated\n");
|
||||
+ SysFreeString(str);
|
||||
+
|
||||
+ memset(buf, 0xaa, 1025);
|
||||
+ str = SysAllocStringByteLen(buf, i);
|
||||
+ ok (str != NULL, "Expected non-NULL\n");
|
||||
+ bstr = Get(str);
|
||||
+ ok (bstr->dwLen == i, "Expected %d, got %d\n", i, bstr->dwLen);
|
||||
+ buf[i] = 0;
|
||||
+ ok (!lstrcmpA((LPCSTR)bstr->szString, buf), "String different\n");
|
||||
+ ok (!bstr->szString[(i+sizeof(WCHAR)-1)/sizeof(WCHAR)], "String not terminated\n");
|
||||
+ SysFreeString(str);
|
||||
+ }
|
||||
+ HeapFree(GetProcessHeap(), 0, buf);
|
||||
}
|
||||
|
||||
static void test_SysReAllocString(void)
|
||||
--
|
||||
2.6.4
|
||||
|
@ -1,33 +0,0 @@
|
||||
From ab8673852c2b53cf96fca841687cdf482b729510 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 27 Dec 2015 18:16:42 +0100
|
||||
Subject: oleaut32/tests: Test SysStringLen() on string allocated with
|
||||
SysAllocStringByteLen.
|
||||
|
||||
---
|
||||
dlls/oleaut32/tests/vartype.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c
|
||||
index d905d37..975922f 100644
|
||||
--- a/dlls/oleaut32/tests/vartype.c
|
||||
+++ b/dlls/oleaut32/tests/vartype.c
|
||||
@@ -5515,6 +5515,7 @@ static void test_SysAllocStringByteLen(void)
|
||||
ok (str != NULL, "Expected non-NULL\n");
|
||||
bstr = Get(str);
|
||||
ok (bstr->dwLen == i, "Expected %d, got %d\n", i, bstr->dwLen);
|
||||
+ ok (SysStringLen(str) == i/sizeof(WCHAR), "Expected %d, got %d\n", i/sizeof(WCHAR), SysStringLen(str));
|
||||
ok (!bstr->szString[(i+sizeof(WCHAR)-1)/sizeof(WCHAR)], "String not terminated\n");
|
||||
SysFreeString(str);
|
||||
|
||||
@@ -5525,6 +5526,7 @@ static void test_SysAllocStringByteLen(void)
|
||||
ok (bstr->dwLen == i, "Expected %d, got %d\n", i, bstr->dwLen);
|
||||
buf[i] = 0;
|
||||
ok (!lstrcmpA((LPCSTR)bstr->szString, buf), "String different\n");
|
||||
+ ok (SysStringLen(str) == i/sizeof(WCHAR), "Expected %d, got %d\n", i/sizeof(WCHAR), SysStringLen(str));
|
||||
ok (!bstr->szString[(i+sizeof(WCHAR)-1)/sizeof(WCHAR)], "String not terminated\n");
|
||||
SysFreeString(str);
|
||||
}
|
||||
--
|
||||
2.6.4
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: SysAllocStringByteLen should align terminating null WCHAR
|
@ -52,13 +52,13 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "93d7356290bfe5bfd2104f98592790841e33420e"
|
||||
echo "d07a7bbba51d6c40a5ed089ab9069451805928c2"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
version()
|
||||
{
|
||||
echo "Wine Staging 1.9.0"
|
||||
echo "Wine Staging 1.9.1 (unreleased)"
|
||||
echo "Copyright (C) 2014-2015 the Wine Staging project authors."
|
||||
echo ""
|
||||
echo "Patchset to be applied on upstream Wine:"
|
||||
@ -209,7 +209,6 @@ patch_enable_all ()
|
||||
enable_ntdll_RtlIpStringToAddress="$1"
|
||||
enable_ntdll_Status_Mapping="$1"
|
||||
enable_ntdll_Syscall_Wrappers="$1"
|
||||
enable_ntdll_SystemHandleInformation="$1"
|
||||
enable_ntdll_SystemRoot_Symlink="$1"
|
||||
enable_ntdll_ThreadTime="$1"
|
||||
enable_ntdll_Threading="$1"
|
||||
@ -226,7 +225,6 @@ patch_enable_all ()
|
||||
enable_nvcuda_CUDA_Support="$1"
|
||||
enable_nvcuvid_CUDA_Video_Support="$1"
|
||||
enable_nvencodeapi_Video_Encoder="$1"
|
||||
enable_oleaut32_SysAllocStringByteLen="$1"
|
||||
enable_oleaut32_TKIND_COCLASS="$1"
|
||||
enable_oleaut32_x86_64_Marshaller="$1"
|
||||
enable_openal32_EFX_Extension="$1"
|
||||
@ -742,9 +740,6 @@ patch_enable ()
|
||||
ntdll-Syscall_Wrappers)
|
||||
enable_ntdll_Syscall_Wrappers="$2"
|
||||
;;
|
||||
ntdll-SystemHandleInformation)
|
||||
enable_ntdll_SystemHandleInformation="$2"
|
||||
;;
|
||||
ntdll-SystemRoot_Symlink)
|
||||
enable_ntdll_SystemRoot_Symlink="$2"
|
||||
;;
|
||||
@ -793,9 +788,6 @@ patch_enable ()
|
||||
nvencodeapi-Video_Encoder)
|
||||
enable_nvencodeapi_Video_Encoder="$2"
|
||||
;;
|
||||
oleaut32-SysAllocStringByteLen)
|
||||
enable_oleaut32_SysAllocStringByteLen="$2"
|
||||
;;
|
||||
oleaut32-TKIND_COCLASS)
|
||||
enable_oleaut32_TKIND_COCLASS="$2"
|
||||
;;
|
||||
@ -4453,18 +4445,6 @@ if test "$enable_ntdll_Status_Mapping" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-SystemHandleInformation
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ntdll/nt.c, dlls/ntdll/tests/info.c, server/handle.c, server/protocol.def, server/trace.c
|
||||
# |
|
||||
if test "$enable_ntdll_SystemHandleInformation" -eq 1; then
|
||||
patch_apply ntdll-SystemHandleInformation/0001-server-Implement-wineserver-call-for-SystemHandleInf.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "server: Implement wineserver call for SystemHandleInformation.", 2 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-SystemRoot_Symlink
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
@ -4754,22 +4734,6 @@ if test "$enable_nvencodeapi_Video_Encoder" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset oleaut32-SysAllocStringByteLen
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/oleaut32/oleaut.c, dlls/oleaut32/tests/vartype.c
|
||||
# |
|
||||
if test "$enable_oleaut32_SysAllocStringByteLen" -eq 1; then
|
||||
patch_apply oleaut32-SysAllocStringByteLen/0001-oleaut32-Pass-size-without-terminating-null-to-get_c.patch
|
||||
patch_apply oleaut32-SysAllocStringByteLen/0002-oleaut32-Align-terminating-null-character-in-SysAllo.patch
|
||||
patch_apply oleaut32-SysAllocStringByteLen/0003-oleaut32-tests-Test-SysStringLen-on-string-allocated.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "oleaut32: Pass size without terminating null to get_cache_entry.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "oleaut32: Align terminating null character in SysAllocStringByteLen.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "oleaut32/tests: Test SysStringLen() on string allocated with SysAllocStringByteLen.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset oleaut32-TKIND_COCLASS
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -1,3 +1,9 @@
|
||||
wine-staging (1.9.1) UNRELEASED; urgency=low
|
||||
* Removed patch to implement SystemHandleInformation (accepted upstream).
|
||||
* Removed patch to align terminating null WCHAR in SysAllocStringByteLen
|
||||
(accepted upstream).
|
||||
-- Sebastian Lackner <sebastian@fds-team.de> Wed, 30 Dec 2015 01:03:12 +0100
|
||||
|
||||
wine-staging (1.9.0) unstable; urgency=low
|
||||
* Updated patch for x86_64 set_cpu_context implementation and add tests.
|
||||
* Added patch to align terminating null WCHAR in SysAllocStringByteLen.
|
||||
|
Loading…
Reference in New Issue
Block a user