winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2008
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
734 discussions
Start a n
N
ew thread
Francois Gouget : ntdll/tests: Test how NT(Set, Query)ValueKey() handle non-terminated strings.
by Alexandre Julliard
19 Nov '08
19 Nov '08
Module: wine Branch: master Commit: 500be1e8db1b081900fd1ce9802265bc831d1c8a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=500be1e8db1b081900fd1ce98…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Nov 18 21:58:04 2008 +0100 ntdll/tests: Test how NT(Set, Query)ValueKey() handle non-terminated strings. --- dlls/ntdll/tests/reg.c | 29 +++++++++++++++++++++++++++-- 1 files changed, 27 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 7b4a9ed..23dd278 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -29,6 +29,11 @@ #include "winnls.h" #include "stdlib.h" +/* A test string */ +static const WCHAR stringW[] = {'s', 't', 'r', 'i', 'n', 'g', 'W', 0}; +/* A size, in bytes, short enough to cause truncation of the above */ +#define STR_TRUNC_SIZE (sizeof(stringW)-2*sizeof(*stringW)) + #ifndef __WINE_WINTERNL_H /* RtlQueryRegistryValues structs and defines */ @@ -413,16 +418,20 @@ static void test_NtSetValueKey(void) UNICODE_STRING ValName; DWORD data = 711; - pRtlCreateUnicodeStringFromAsciiz(&ValName, "deletetest"); - InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0); status = pNtOpenKey(&key, am, &attr); ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status); + pRtlCreateUnicodeStringFromAsciiz(&ValName, "deletetest"); status = pNtSetValueKey(key, &ValName, 0, REG_DWORD, &data, sizeof(data)); ok(status == STATUS_SUCCESS, "NtSetValueKey Failed: 0x%08x\n", status); + pRtlFreeUnicodeString(&ValName); + pRtlCreateUnicodeStringFromAsciiz(&ValName, "stringtest"); + status = pNtSetValueKey(key, &ValName, 0, REG_SZ, (VOID*)stringW, STR_TRUNC_SIZE); + ok(status == STATUS_SUCCESS, "NtSetValueKey Failed: 0x%08x\n", status); pRtlFreeUnicodeString(&ValName); + pNtClose(key); } @@ -545,6 +554,22 @@ static void test_NtQueryValueKey(void) HeapFree(GetProcessHeap(), 0, full_info); pRtlFreeUnicodeString(&ValName); + pRtlCreateUnicodeStringFromAsciiz(&ValName, "stringtest"); + + status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, NULL, 0, &len); + todo_wine ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryValueKey should have returned STATUS_BUFFER_TOO_SMALL instead of 0x%08x\n", status); + partial_info = HeapAlloc(GetProcessHeap(), 0, len+1); + memset((BYTE*)partial_info, 0xbd, len+1); + status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, len, &len); + ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08x\n", status); + ok(partial_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", partial_info->TitleIndex); + ok(partial_info->Type == REG_SZ, "NtQueryValueKey returned wrong Type %d\n", partial_info->Type); + ok(partial_info->DataLength == STR_TRUNC_SIZE, "NtQueryValueKey returned wrong DataLength %d\n", partial_info->DataLength); + ok(!memcmp(partial_info->Data, stringW, STR_TRUNC_SIZE), "incorrect Data returned\n"); + ok(*(partial_info->Data+STR_TRUNC_SIZE) == 0xbd, "string overflowed %02x\n", *(partial_info->Data+STR_TRUNC_SIZE)); + HeapFree(GetProcessHeap(), 0, partial_info); + + pRtlFreeUnicodeString(&ValName); pNtClose(key); }
1
0
0
0
Francois Gouget : ntdll/tests: Fix typos in test_NtQueryValueKey().
by Alexandre Julliard
19 Nov '08
19 Nov '08
Module: wine Branch: master Commit: d7d95ca27ce135cfdb4a6f7a8eaf01adb1c4a4b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d7d95ca27ce135cfdb4a6f7a8…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Nov 18 21:57:09 2008 +0100 ntdll/tests: Fix typos in test_NtQueryValueKey(). --- dlls/ntdll/tests/reg.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 70864b6..7b4a9ed 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -486,7 +486,7 @@ static void test_NtQueryValueKey(void) basic_info = HeapAlloc(GetProcessHeap(), 0, len); status = pNtQueryValueKey(key, &ValName, KeyValueBasicInformation, basic_info, len, &len); ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey should have returned STATUS_BUFFER_OVERFLOW instead of 0x%08x\n", status); - ok(basic_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", basic_info->Type); + ok(basic_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", basic_info->TitleIndex); ok(basic_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", basic_info->Type); ok(basic_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %d\n", basic_info->NameLength); ok(len == FIELD_OFFSET(KEY_VALUE_BASIC_INFORMATION, Name[basic_info->NameLength/sizeof(WCHAR)]), "NtQueryValueKey returned wrong len %d\n", len); @@ -494,7 +494,7 @@ static void test_NtQueryValueKey(void) basic_info = HeapReAlloc(GetProcessHeap(), 0, basic_info, len); status = pNtQueryValueKey(key, &ValName, KeyValueBasicInformation, basic_info, len, &len); ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08x\n", status); - ok(basic_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", basic_info->Type); + ok(basic_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", basic_info->TitleIndex); ok(basic_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", basic_info->Type); ok(basic_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %d\n", basic_info->NameLength); ok(len == FIELD_OFFSET(KEY_VALUE_BASIC_INFORMATION, Name[basic_info->NameLength/sizeof(WCHAR)]), "NtQueryValueKey returned wrong len %d\n", len); @@ -505,7 +505,7 @@ static void test_NtQueryValueKey(void) partial_info = HeapAlloc(GetProcessHeap(), 0, len); status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, len, &len); ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey should have returned STATUS_BUFFER_OVERFLOW instead of 0x%08x\n", status); - ok(partial_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", partial_info->Type); + ok(partial_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", partial_info->TitleIndex); ok(partial_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", partial_info->Type); ok(partial_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %d\n", partial_info->DataLength); ok(len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[partial_info->DataLength]), "NtQueryValueKey returned wrong len %d\n", len); @@ -513,7 +513,7 @@ static void test_NtQueryValueKey(void) partial_info = HeapReAlloc(GetProcessHeap(), 0, partial_info, len); status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, len, &len); ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08x\n", status); - ok(partial_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", partial_info->Type); + ok(partial_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", partial_info->TitleIndex); ok(partial_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", partial_info->Type); ok(partial_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %d\n", partial_info->DataLength); ok(len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[partial_info->DataLength]), "NtQueryValueKey returned wrong len %d\n", len); @@ -524,7 +524,7 @@ static void test_NtQueryValueKey(void) full_info = HeapAlloc(GetProcessHeap(), 0, len); status = pNtQueryValueKey(key, &ValName, KeyValueFullInformation, full_info, len, &len); ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey should have returned STATUS_BUFFER_OVERFLOW instead of 0x%08x\n", status); - ok(full_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", full_info->Type); + ok(full_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", full_info->TitleIndex); ok(full_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", full_info->Type); ok(full_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %d\n", full_info->DataLength); ok(full_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %d\n", full_info->NameLength); @@ -535,7 +535,7 @@ static void test_NtQueryValueKey(void) full_info = HeapReAlloc(GetProcessHeap(), 0, full_info, len); status = pNtQueryValueKey(key, &ValName, KeyValueFullInformation, full_info, len, &len); ok(status == STATUS_SUCCESS, "NtQueryValueKey should have returned STATUS_SUCCESS instead of 0x%08x\n", status); - ok(full_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", full_info->Type); + ok(full_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", full_info->TitleIndex); ok(full_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", full_info->Type); ok(full_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %d\n", full_info->DataLength); ok(full_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %d\n", full_info->NameLength);
1
0
0
0
Alexandre Julliard : ntdll: Get rid of the Wine-specific MEM_SYSTEM flag.
by Alexandre Julliard
19 Nov '08
19 Nov '08
Module: wine Branch: master Commit: f3e70ee00e19a59225660d40fc4f591a2940bf62 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f3e70ee00e19a59225660d40f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 18 20:14:46 2008 +0100 ntdll: Get rid of the Wine-specific MEM_SYSTEM flag. --- dlls/ntdll/virtual.c | 40 +++++++++++----------------------------- include/winnt.h | 3 --- 2 files changed, 11 insertions(+), 32 deletions(-) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 12424f0..f5bed62 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1605,32 +1605,23 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG zero_ /* Compute the alloc type flags */ - if (!(type & MEM_SYSTEM)) + if (!(type & (MEM_COMMIT | MEM_RESERVE)) || + (type & ~(MEM_COMMIT | MEM_RESERVE | MEM_TOP_DOWN | MEM_WRITE_WATCH | MEM_RESET))) { - if (!(type & (MEM_COMMIT | MEM_RESERVE)) || - (type & ~(MEM_COMMIT | MEM_RESERVE | MEM_TOP_DOWN | MEM_WRITE_WATCH | MEM_RESET))) - { - WARN("called with wrong alloc type flags (%08x) !\n", type); - return STATUS_INVALID_PARAMETER; - } - if (type & MEM_WRITE_WATCH) - { - FIXME("MEM_WRITE_WATCH type not supported\n"); - return STATUS_INVALID_PARAMETER; - } + WARN("called with wrong alloc type flags (%08x) !\n", type); + return STATUS_INVALID_PARAMETER; + } + if (type & MEM_WRITE_WATCH) + { + FIXME("MEM_WRITE_WATCH type not supported\n"); + return STATUS_INVALID_PARAMETER; } /* Reserve the memory */ if (use_locks) server_enter_uninterrupted_section( &csVirtual, &sigset ); - if (type & MEM_SYSTEM) - { - if (type & MEM_IMAGE) vprot |= VPROT_IMAGE | VPROT_NOEXEC; - status = create_view( &view, base, size, vprot | VPROT_COMMITTED | VPROT_SYSTEM ); - if (status == STATUS_SUCCESS) base = view->base; - } - else if ((type & MEM_RESERVE) || !base) + if ((type & MEM_RESERVE) || !base) { status = map_view( &view, base, size, mask, type & MEM_TOP_DOWN, vprot ); if (status == STATUS_SUCCESS) base = view->base; @@ -1707,7 +1698,7 @@ NTSTATUS WINAPI NtFreeVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T *si base = ROUND_ADDR( addr, page_mask ); /* avoid freeing the DOS area when a broken app passes a NULL pointer */ - if (!base && !(type & MEM_SYSTEM)) return STATUS_INVALID_PARAMETER; + if (!base) return STATUS_INVALID_PARAMETER; server_enter_uninterrupted_section( &csVirtual, &sigset ); @@ -1717,15 +1708,6 @@ NTSTATUS WINAPI NtFreeVirtualMemory( HANDLE process, PVOID *addr_ptr, SIZE_T *si { status = STATUS_INVALID_PARAMETER; } - else if (type & MEM_SYSTEM) - { - /* return the values that the caller should use to unmap the area */ - *addr_ptr = view->base; - if (!wine_mmap_is_in_reserved_area( view->base, view->size )) *size_ptr = view->size; - else *size_ptr = 0; /* make sure we don't munmap anything from a reserved area */ - view->protect |= VPROT_SYSTEM; - delete_view( view ); - } else if (type == MEM_RELEASE) { /* Free the pages */ diff --git a/include/winnt.h b/include/winnt.h index 6fa89dd..a1e9fe0 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -575,9 +575,6 @@ typedef struct _MEMORY_BASIC_INFORMATION #define MEM_PHYSICAL 0x00400000 #define MEM_LARGE_PAGES 0x20000000 #define MEM_4MB_PAGES 0x80000000 -#ifdef __WINESRC__ -#define MEM_SYSTEM 0x80000000 -#endif #define SEC_FILE 0x00800000 #define SEC_IMAGE 0x01000000
1
0
0
0
Alexandre Julliard : kernel32: Moved allocation of the DOS memory area to ntdll.
by Alexandre Julliard
19 Nov '08
19 Nov '08
Module: wine Branch: master Commit: f4eaa15aecdef19160a5f57fc7e21e62f5b7b69b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f4eaa15aecdef19160a5f57fc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 18 20:11:49 2008 +0100 kernel32: Moved allocation of the DOS memory area to ntdll. --- dlls/kernel32/dosmem.c | 84 ++++++++++++----------------------------------- dlls/ntdll/virtual.c | 79 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 99 insertions(+), 64 deletions(-) diff --git a/dlls/kernel32/dosmem.c b/dlls/kernel32/dosmem.c index f3aad4c..a1bff4d 100644 --- a/dlls/kernel32/dosmem.c +++ b/dlls/kernel32/dosmem.c @@ -151,77 +151,37 @@ static LONG WINAPI dosmem_handler(EXCEPTION_POINTERS* except) return EXCEPTION_CONTINUE_SEARCH; } -/********************************************************************** - * setup_dos_mem +/*********************************************************************** + * DOSMEM_Init * - * Setup the first megabyte for DOS memory access + * Create the dos memory segments, and store them into the KERNEL + * exported values. */ -static char* setup_dos_mem(void) +BOOL DOSMEM_Init(void) { - size_t size; - int page_size = getpagesize(); - void *addr = NULL; - void * const low_64k = (void *)DOSMEM_64KB; - - /* check without the first 64K */ + char *sysmem; + void *addr = (void *)1; + SIZE_T size = DOSMEM_SIZE - 1; - if (wine_mmap_is_in_reserved_area( low_64k, DOSMEM_SIZE - DOSMEM_64KB ) != 1) + if (NtAllocateVirtualMemory( GetCurrentProcess(), &addr, 0, &size, + MEM_RESERVE | MEM_COMMIT, PAGE_NOACCESS )) { - addr = wine_anon_mmap( low_64k, DOSMEM_SIZE - DOSMEM_64KB, PROT_READ | PROT_WRITE, 0 ); - if (addr != low_64k) - { - if (addr != MAP_FAILED) munmap( addr, DOSMEM_SIZE - DOSMEM_64KB ); - ERR("Cannot use first megabyte for DOS address space, please report\n" ); - /* allocate the DOS area somewhere else */ - if (!(DOSMEM_dosmem = VirtualAlloc( NULL, DOSMEM_SIZE, MEM_RESERVE, PAGE_NOACCESS ))) - { - ERR( "Cannot allocate DOS memory\n" ); - ExitProcess(1); - } - return DOSMEM_dosmem; - } + ERR( "Cannot allocate DOS memory\n" ); + ExitProcess(1); } - /* now try to allocate the low 64K too */ - - if (wine_mmap_is_in_reserved_area( NULL, DOSMEM_64KB ) != 1) + DOSMEM_dosmem = addr; + if (!addr) { - addr = wine_anon_mmap( (void *)page_size, DOSMEM_64KB - page_size, PROT_READ | PROT_WRITE, 0 ); - if (addr == (void *)page_size) - { - addr = NULL; - TRACE( "successfully mapped low 64K range\n" ); - } - else - { - if (addr != MAP_FAILED) munmap( addr, DOSMEM_64KB - page_size ); - addr = low_64k; - TRACE( "failed to map low 64K range\n" ); - } + DOSMEM_protect = DOSMEM_64KB; + sysmem = (char *)0xf0000; /* store sysmem in high addresses for now */ + } + else + { + WARN( "First megabyte not available for DOS address space.\n" ); + DOSMEM_protect = 0; + sysmem = DOSMEM_dosmem; } - else addr = NULL; - - /* now reserve the whole range */ - size = (char *)DOSMEM_SIZE - (char *)addr; - wine_anon_mmap( addr, size, PROT_NONE, MAP_FIXED ); - - /* inform the memory manager that there is a mapping here, but don't commit yet */ - VirtualAlloc( addr, size, MEM_RESERVE | MEM_SYSTEM, PAGE_NOACCESS ); - DOSMEM_protect = DOSMEM_64KB; - DOSMEM_dosmem = NULL; - return (char *)0xf0000; /* store sysmem in high addresses for now */ -} - - -/*********************************************************************** - * DOSMEM_Init - * - * Create the dos memory segments, and store them into the KERNEL - * exported values. - */ -BOOL DOSMEM_Init(void) -{ - char* sysmem = setup_dos_mem(); RtlAddVectoredExceptionHandler(FALSE, dosmem_handler); DOSMEM_0000H = GLOBAL_CreateBlock( GMEM_FIXED, sysmem, diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 80cd32f..12424f0 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -861,6 +861,66 @@ static NTSTATUS decommit_pages( struct file_view *view, size_t start, size_t siz /*********************************************************************** + * allocate_dos_memory + * + * Allocate the DOS memory range. + */ +static NTSTATUS allocate_dos_memory( struct file_view **view, unsigned int vprot ) +{ + size_t size; + void *addr = NULL; + void * const low_64k = (void *)0x10000; + const size_t dosmem_size = 0x110000; + int unix_prot = VIRTUAL_GetUnixProt( vprot ); + struct list *ptr; + + /* check for existing view */ + + if ((ptr = list_head( &views_list ))) + { + struct file_view *first_view = LIST_ENTRY( ptr, struct file_view, entry ); + if (first_view->base < (void *)dosmem_size) return STATUS_CONFLICTING_ADDRESSES; + } + + /* check without the first 64K */ + + if (wine_mmap_is_in_reserved_area( low_64k, dosmem_size - 0x10000 ) != 1) + { + addr = wine_anon_mmap( low_64k, dosmem_size - 0x10000, unix_prot, 0 ); + if (addr != low_64k) + { + if (addr != (void *)-1) munmap( addr, dosmem_size - 0x10000 ); + return map_view( view, NULL, dosmem_size, 0xffff, 0, vprot ); + } + } + + /* now try to allocate the low 64K too */ + + if (wine_mmap_is_in_reserved_area( NULL, 0x10000 ) != 1) + { + addr = wine_anon_mmap( (void *)page_size, 0x10000 - page_size, unix_prot, 0 ); + if (addr == (void *)page_size) + { + addr = NULL; + TRACE( "successfully mapped low 64K range\n" ); + } + else + { + if (addr != (void *)-1) munmap( addr, 0x10000 - page_size ); + addr = low_64k; + TRACE( "failed to map low 64K range\n" ); + } + } + + /* now reserve the whole range */ + + size = (char *)dosmem_size - (char *)addr; + wine_anon_mmap( addr, size, unix_prot, MAP_FIXED ); + return create_view( view, addr, size, vprot ); +} + + +/*********************************************************************** * map_image * * Map an executable (PE format) image into memory. @@ -1506,6 +1566,9 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG zero_ if (is_beyond_limit( 0, size, working_set_limit )) return STATUS_WORKING_SET_LIMIT_RANGE; + vprot = VIRTUAL_GetProt( protect ) | VPROT_VALLOC; + if (type & MEM_COMMIT) vprot |= VPROT_COMMITTED; + if (*ret) { if (type & MEM_RESERVE) /* Round down to 64k boundary */ @@ -1514,6 +1577,20 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG zero_ base = ROUND_ADDR( *ret, page_mask ); size = (((UINT_PTR)*ret + size + page_mask) & ~page_mask) - (UINT_PTR)base; + /* address 1 is magic to mean DOS area */ + if (!base && *ret == (void *)1 && size == 0x110000) + { + server_enter_uninterrupted_section( &csVirtual, &sigset ); + status = allocate_dos_memory( &view, vprot ); + if (status == STATUS_SUCCESS) + { + *ret = view->base; + *size_ptr = view->size; + } + server_leave_uninterrupted_section( &csVirtual, &sigset ); + return status; + } + /* disallow low 64k, wrap-around and kernel space */ if (((char *)base < (char *)0x10000) || ((char *)base + size < (char *)base) || @@ -1542,8 +1619,6 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG zero_ return STATUS_INVALID_PARAMETER; } } - vprot = VIRTUAL_GetProt( protect ) | VPROT_VALLOC; - if (type & MEM_COMMIT) vprot |= VPROT_COMMITTED; /* Reserve the memory */
1
0
0
0
Damjan Jovanovic : user32: Handle NULL rectangles in WM_NCCALCSIZE.
by Alexandre Julliard
18 Nov '08
18 Nov '08
Module: wine Branch: master Commit: 1603a51d4ee2454dc8bb479a128e702ee124c31f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1603a51d4ee2454dc8bb479a1…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Sat Nov 15 18:15:04 2008 +0200 user32: Handle NULL rectangles in WM_NCCALCSIZE. --- dlls/user32/nonclient.c | 3 +++ dlls/user32/tests/win.c | 5 +++++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c index 3fa870e..708ed80 100644 --- a/dlls/user32/nonclient.c +++ b/dlls/user32/nonclient.c @@ -417,6 +417,9 @@ LRESULT NC_HandleNCCalcSize( HWND hwnd, RECT *winRect ) LONG style = GetWindowLongW( hwnd, GWL_STYLE ); LONG exStyle = GetWindowLongW( hwnd, GWL_EXSTYLE ); + if (winRect == NULL) + return 0; + if (cls_style & CS_VREDRAW) result |= WVR_VREDRAW; if (cls_style & CS_HREDRAW) result |= WVR_HREDRAW; diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 827d0e3..f0e143a 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -781,6 +781,7 @@ static void test_nonclient_area(HWND hwnd) RECT rc_window, rc_client, rc; BOOL menu; BOOL is_win9x = GetWindowLongPtrW(hwnd, GWLP_WNDPROC) == 0; + LRESULT ret; style = GetWindowLongA(hwnd, GWL_STYLE); exstyle = GetWindowLongA(hwnd, GWL_EXSTYLE); @@ -809,6 +810,10 @@ static void test_nonclient_area(HWND hwnd) trace("calc client: (%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom); ok(EqualRect(&rc, &rc_client), "client rect does not match: style:exstyle=0x%08x:0x%08x, menu=%d\n", style, exstyle, menu); + /* NULL rectangle shouldn't crash */ + ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, 0); + ok(ret == 0, "NULL rectangle returned %ld instead of 0\n", ret); + /* Win9x doesn't like WM_NCCALCSIZE with synthetic data and crashes */; if (is_win9x) return;
1
0
0
0
Juan Lang : cryptdlg: Register/ unregister the OID functions exported by cryptdlg.
by Alexandre Julliard
18 Nov '08
18 Nov '08
Module: wine Branch: master Commit: 0aca97a2479519210bf44fe13f1fb8823e8c6fd3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0aca97a2479519210bf44fe13…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Nov 14 19:34:00 2008 -0800 cryptdlg: Register/unregister the OID functions exported by cryptdlg. --- dlls/cryptdlg/main.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/dlls/cryptdlg/main.c b/dlls/cryptdlg/main.c index 46fb7ed..e8f2514 100644 --- a/dlls/cryptdlg/main.c +++ b/dlls/cryptdlg/main.c @@ -465,6 +465,8 @@ BOOL WINAPI CertViewPropertiesW(CERT_VIEWPROPERTIES_STRUCT_W *info) return ret; } +#define szOID_MICROSOFT_Encryption_Key_Preference "1.3.6.1.4.1.311.16.4" + /*********************************************************************** * DllRegisterServer (CRYPTDLG.@) */ @@ -484,6 +486,8 @@ HRESULT WINAPI DllRegisterServer(void) 'F','i','n','a','l','P','o','l','i','c','y',0 }; static WCHAR certTrustCleanup[] = { 'C','e','r','t','T','r','u','s','t', 'C','l','e','a','n','u','p',0 }; + static const WCHAR cryptDlg[] = { 'c','r','y','p','t','d','l','g','.', + 'd','l','l',0 }; CRYPT_REGISTER_ACTIONID reg; GUID guid = CERT_CERTIFICATE_ACTION_VERIFY; HRESULT hr = S_OK; @@ -507,6 +511,18 @@ HRESULT WINAPI DllRegisterServer(void) reg.sCleanupProvider.pwszFunctionName = certTrustCleanup; if (!WintrustAddActionID(&guid, WT_ADD_ACTION_ID_RET_RESULT_FLAG, ®)) hr = GetLastError(); + CryptRegisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_ENCODE_OBJECT_FUNC, + "1.3.6.1.4.1.311.16.1.1", cryptDlg, "EncodeAttrSequence"); + CryptRegisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_ENCODE_OBJECT_FUNC, + szOID_MICROSOFT_Encryption_Key_Preference, cryptDlg, "EncodeRecipientID"); + CryptRegisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_DECODE_OBJECT_FUNC, + "1.3.6.1.4.1.311.16.1.1", cryptDlg, "DecodeAttrSequence"); + CryptRegisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_DECODE_OBJECT_FUNC, + szOID_MICROSOFT_Encryption_Key_Preference, cryptDlg, "DecodeRecipientID"); + CryptRegisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_FORMAT_OBJECT_FUNC, + szOID_PKIX_KP_EMAIL_PROTECTION, cryptDlg, "FormatPKIXEmailProtection"); + CryptRegisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_FORMAT_OBJECT_FUNC, + szOID_CERT_POLICIES, cryptDlg, "FormatVerisignExtension"); return hr; } @@ -518,5 +534,17 @@ HRESULT WINAPI DllUnregisterServer(void) GUID guid = CERT_CERTIFICATE_ACTION_VERIFY; WintrustRemoveActionID(&guid); + CryptUnregisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_ENCODE_OBJECT_FUNC, + "1.3.6.1.4.1.311.16.1.1"); + CryptUnregisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_ENCODE_OBJECT_FUNC, + szOID_MICROSOFT_Encryption_Key_Preference); + CryptUnregisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_DECODE_OBJECT_FUNC, + "1.3.6.1.4.1.311.16.1.1"); + CryptUnregisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_DECODE_OBJECT_FUNC, + szOID_MICROSOFT_Encryption_Key_Preference); + CryptUnregisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_FORMAT_OBJECT_FUNC, + szOID_PKIX_KP_EMAIL_PROTECTION); + CryptUnregisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_FORMAT_OBJECT_FUNC, + szOID_CERT_POLICIES); return S_OK; }
1
0
0
0
Daniel Zimmermann : widl: Fix check for interface type in get_size_procformatstring.
by Alexandre Julliard
18 Nov '08
18 Nov '08
Module: wine Branch: master Commit: 89cf227601aa67e407910fdef7d16b3bd97d8959 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=89cf227601aa67e407910fdef…
Author: Daniel Zimmermann <netzimme(a)aim.com> Date: Mon Nov 17 15:34:01 2008 -0500 widl: Fix check for interface type in get_size_procformatstring. --- tools/widl/typegen.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index fcb141e..45467e5 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -3137,7 +3137,7 @@ size_t get_size_procformatstring(const statement_list_t *stmts, type_pred_t pred size += get_size_procformatstring(stmt->u.lib->stmts, pred) - 1; continue; } - else if (stmt->type != STMT_TYPE && stmt->u.type->type != RPC_FC_IP) + else if (stmt->type != STMT_TYPE || stmt->u.type->type != RPC_FC_IP) continue; iface = stmt->u.type;
1
0
0
0
Alexandre Julliard : kernel32/tests: Allow up to 2 seconds of difference in timestamps.
by Alexandre Julliard
18 Nov '08
18 Nov '08
Module: wine Branch: master Commit: 0d6415df16750769cf805255c46c05fe051194b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d6415df16750769cf805255c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 18 13:52:25 2008 +0100 kernel32/tests: Allow up to 2 seconds of difference in timestamps. --- dlls/kernel32/tests/file.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index e589f6e..7297662 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -2113,12 +2113,12 @@ static void test_ReplaceFileA(void) /* make sure that the backup has the old "replaced" filetime */ ret = GetFileTime(hBackupFile, NULL, NULL, &ftBackup); ok( ret, "GetFileTime error (backup %d\n", GetLastError()); - ok(check_file_time(&ftBackup, &ftReplaced, 1000000), "backup file has wrong filetime\n"); + ok(check_file_time(&ftBackup, &ftReplaced, 20000000), "backup file has wrong filetime\n"); CloseHandle(hBackupFile); /* make sure that the "replaced" has the old replacement filetime */ ret = GetFileTime(hReplacedFile, NULL, NULL, &ftReplaced); ok( ret, "GetFileTime error (backup %d\n", GetLastError()); - ok(check_file_time(&ftReplaced, &ftReplacement, 1000000), + ok(check_file_time(&ftReplaced, &ftReplacement, 20000000), "replaced file has wrong filetime %x%08x / %x%08x\n", ftReplaced.dwHighDateTime, ftReplaced.dwLowDateTime, ftReplacement.dwHighDateTime, ftReplacement.dwLowDateTime );
1
0
0
0
Paul Vriens : winetest: Give the 'Running' progress bar the same size as the others.
by Alexandre Julliard
18 Nov '08
18 Nov '08
Module: wine Branch: master Commit: 812c5e1bf19504e8155d43145b001b6cd2077520 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=812c5e1bf19504e8155d43145…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Tue Nov 18 11:39:55 2008 +0100 winetest: Give the 'Running' progress bar the same size as the others. --- programs/winetest/winetest.rc | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/programs/winetest/winetest.rc b/programs/winetest/winetest.rc index a28e0d7..4d406f2 100644 --- a/programs/winetest/winetest.rc +++ b/programs/winetest/winetest.rc @@ -49,9 +49,9 @@ BEGIN LTEXT "Extracting:", IDC_ST0, 10, 5, 140, 10 CONTROL "PB0", IDC_PB0, PROGRESS_CLASS, 0, 5, 15, 150, 10 LTEXT "Running:", IDC_ST1, 10, 30, 140, 10 - CONTROL "PB1", IDC_PB1, PROGRESS_CLASS, 0, 5, 40, 150, 15 - LTEXT "Network transfer:", IDC_ST2, 10, 60, 140, 10 - CONTROL "PB2", IDC_PB2, PROGRESS_CLASS, 0, 5, 70, 150, 10 + CONTROL "PB1", IDC_PB1, PROGRESS_CLASS, 0, 5, 40, 150, 10 + LTEXT "Network transfer:", IDC_ST2, 10, 55, 140, 10 + CONTROL "PB2", IDC_PB2, PROGRESS_CLASS, 0, 5, 65, 150, 10 LTEXT "Tag:", IDC_STATIC, 10, 89, 100, 10 EDITTEXT IDC_TAG, 25, 88, 125, 10,
1
0
0
0
Ricardo Filipe : mlang: Fixed dead stores (llvm/clang).
by Alexandre Julliard
18 Nov '08
18 Nov '08
Module: wine Branch: master Commit: eb45cae5dbcd8c36895a349dc2f319fce7713e1f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eb45cae5dbcd8c36895a349dc…
Author: Ricardo Filipe <ricardo_barbano(a)hotmail.com> Date: Thu Nov 13 01:16:24 2008 +0000 mlang: Fixed dead stores (llvm/clang). --- dlls/mlang/mlang.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/dlls/mlang/mlang.c b/dlls/mlang/mlang.c index 69ae690..b92bb7b 100644 --- a/dlls/mlang/mlang.c +++ b/dlls/mlang/mlang.c @@ -999,7 +999,6 @@ HRESULT WINAPI ConvertINetUnicodeToMultiByte( if (pDstStr) { - size = min(size, destsz); size = ConvertJapaneseUnicodeToJIS(pSrcStr, *pcSrcSize, pDstStr, destsz); if (!size) @@ -1016,7 +1015,6 @@ HRESULT WINAPI ConvertINetUnicodeToMultiByte( if (pDstStr) { - size = min(size, destsz); size = WideCharToMultiByte(dwEncoding, 0, pSrcStr, *pcSrcSize, pDstStr, destsz, NULL, NULL); if (!size)
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
74
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Results per page:
10
25
50
100
200