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
February 2010
----- 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
783 discussions
Start a n
N
ew thread
Alexandre Julliard : urlmon/tests: Avoid size_t in a trace.
by Alexandre Julliard
16 Feb '10
16 Feb '10
Module: wine Branch: master Commit: 08e53fc048a2ec495b883465ee54e719a683e3b3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=08e53fc048a2ec495b883465e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Feb 16 15:50:36 2010 +0100 urlmon/tests: Avoid size_t in a trace. --- dlls/urlmon/tests/misc.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/urlmon/tests/misc.c b/dlls/urlmon/tests/misc.c index 467aa7c..2e77c1b 100644 --- a/dlls/urlmon/tests/misc.c +++ b/dlls/urlmon/tests/misc.c @@ -962,8 +962,7 @@ static void test_NameSpace(void) hres = CoInternetParseUrl(url8, PARSE_SECURITY_URL, 0, buf, sizeof(buf)/sizeof(WCHAR), &size, 0); ok(hres == S_OK, "CoInternetParseUrl failed: %08x\n", hres); - ok(size == sizeof(url1)/sizeof(WCHAR), "Size = %d, expected %d\n", - size, sizeof(url1)/sizeof(WCHAR)); + ok(size == sizeof(url1)/sizeof(WCHAR), "Size = %d\n", size); if(size == sizeof(url1)/sizeof(WCHAR)) ok(!memcmp(buf, url1, sizeof(url1)), "Encoded url = %s\n", wine_dbgstr_w(buf));
1
0
0
0
Alexandre Julliard : msvcrt/tests: Avoid size_t in a trace.
by Alexandre Julliard
16 Feb '10
16 Feb '10
Module: wine Branch: master Commit: ba7cbccfcb97ec7ddd7bea5f46e4d18d5c86dcd7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ba7cbccfcb97ec7ddd7bea5f4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Feb 16 15:50:32 2010 +0100 msvcrt/tests: Avoid size_t in a trace. --- dlls/msvcrt/tests/file.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c index 5afdfcb..3afc149 100644 --- a/dlls/msvcrt/tests/file.c +++ b/dlls/msvcrt/tests/file.c @@ -893,7 +893,7 @@ static void test_file_write_read( void ) /* test _read in buffered mode. Last CR should be skipped but LF not pulled in */ tempfd = _open(tempf,_O_RDONLY|_O_TEXT); /* open in TEXT mode */ i = _read(tempfd,btext, strlen(mytext)); - ok(i == strlen(mytext)-1, "_read_i %d vs %d\n", i, strlen(mytext)); + ok(i == strlen(mytext)-1, "_read_i %d\n", i); _close(tempfd); ret =_chmod (tempf, _S_IREAD | _S_IWRITE);
1
0
0
0
Alexandre Julliard : winmm/tests: Fix a couple of incorrect casts.
by Alexandre Julliard
16 Feb '10
16 Feb '10
Module: wine Branch: master Commit: f7a447badabb4a82e67456fb2760a5e9220d2b17 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f7a447badabb4a82e67456fb2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Feb 16 15:50:21 2010 +0100 winmm/tests: Fix a couple of incorrect casts. --- dlls/winmm/tests/midi.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/winmm/tests/midi.c b/dlls/winmm/tests/midi.c index 4a39cfc..4038d41 100644 --- a/dlls/winmm/tests/midi.c +++ b/dlls/winmm/tests/midi.c @@ -234,9 +234,9 @@ static void test_midiOut_device(UINT udev, HWND hwnd) ok(!rc, "midiOutSetVolume restore rc=%s\n", mmsys_error(rc)); } } - rc = midiOutGetDevCapsA((UINT)hm, &capsA, sizeof(capsA)); + rc = midiOutGetDevCapsA((UINT_PTR)hm, &capsA, sizeof(capsA)); ok(!rc, "midiOutGetDevCaps(dev=%d) by handle rc=%s\n", udev, mmsys_error(rc)); - rc = midiInGetDevCapsA((UINT)hm, (LPMIDIINCAPSA)&capsA, sizeof(DWORD)); + rc = midiInGetDevCapsA((UINT_PTR)hm, (LPMIDIINCAPSA)&capsA, sizeof(DWORD)); ok(rc==MMSYSERR_BADDEVICEID, "midiInGetDevCaps(dev=%d) by out handle rc=%s\n", udev, mmsys_error(rc)); { DWORD e = 0x006F4893; /* velocity, note (#69 would be 440Hz) channel */ @@ -365,8 +365,8 @@ static void test_midiStream(UINT udev, HWND hwnd) Sleep(100); } ok(mhdr.dwFlags & MHDR_DONE, "MHDR.dwFlags %x not DONE when out of queue\n", mhdr.dwFlags); - test_notification(hwnd, "midiStream callback", MOM_POSITIONCB, (DWORD)&mhdr); - test_notification(hwnd, "midiStreamOut", MOM_DONE, (DWORD)&mhdr); + test_notification(hwnd, "midiStream callback", MOM_POSITIONCB, (DWORD_PTR)&mhdr); + test_notification(hwnd, "midiStreamOut", MOM_DONE, (DWORD_PTR)&mhdr); rc = midiOutUnprepareHeader((HMIDIOUT)hm, &mhdr, sizeof(mhdr)); ok(!rc, "midiOutUnprepare rc=%s\n", mmsys_error(rc));
1
0
0
0
Alexandre Julliard : ntdll: Fix the return value of NtOpenKey for some invalid parameters.
by Alexandre Julliard
16 Feb '10
16 Feb '10
Module: wine Branch: master Commit: 0e98500e436852274eb600fa0c691f3ef811fec2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0e98500e436852274eb600fa0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Feb 16 14:32:26 2010 +0100 ntdll: Fix the return value of NtOpenKey for some invalid parameters. --- dlls/advapi32/registry.c | 1 + dlls/ntdll/reg.c | 4 ++-- dlls/ntdll/tests/reg.c | 6 ++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c index 7faee3c..b9cb8c5 100644 --- a/dlls/advapi32/registry.c +++ b/dlls/advapi32/registry.c @@ -311,6 +311,7 @@ LSTATUS WINAPI RegOpenKeyExW( HKEY hkey, LPCWSTR name, DWORD options, REGSAM acc /* NT+ allows beginning backslash for HKEY_CLASSES_ROOT */ if (hkey == HKEY_CLASSES_ROOT && name && *name == '\\') name++; + if (!retkey) return ERROR_INVALID_PARAMETER; if (!(hkey = get_special_root_hkey( hkey ))) return ERROR_INVALID_HANDLE; attr.Length = sizeof(attr); diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c index 9b3aae5..3bee588 100644 --- a/dlls/ntdll/reg.c +++ b/dlls/ntdll/reg.c @@ -116,13 +116,13 @@ NTSTATUS WINAPI NtOpenKey( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTR NTSTATUS ret; DWORD len; - if (!attr) return STATUS_ACCESS_VIOLATION; + if (!retkey || !attr) return STATUS_ACCESS_VIOLATION; + if (attr->Length > sizeof(OBJECT_ATTRIBUTES)) return STATUS_INVALID_PARAMETER; len = attr->ObjectName->Length; TRACE( "(%p,%s,%x,%p)\n", attr->RootDirectory, debugstr_us(attr->ObjectName), access, retkey ); if (len > MAX_NAME_LENGTH) return STATUS_BUFFER_OVERFLOW; - if (!retkey) return STATUS_INVALID_PARAMETER; SERVER_START_REQ( open_key ) { diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 67bd125..8a86627 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -351,14 +351,12 @@ static void test_NtOpenKey(void) /* NULL key */ status = pNtOpenKey(NULL, am, &attr); - todo_wine - ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status); + ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status); /* Length > sizeof(OBJECT_ATTRIBUTES) */ attr.Length *= 2; status = pNtOpenKey(&key, am, &attr); - todo_wine - ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08x\n", status); + ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08x\n", status); } static void test_NtCreateKey(void)
1
0
0
0
Alexandre Julliard : ntdll: Fix the return status of NtQueryValueKey for a too small buffer.
by Alexandre Julliard
16 Feb '10
16 Feb '10
Module: wine Branch: master Commit: 2530304f1c0b3ca0855ef2eb9b0fdff1886c7db8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2530304f1c0b3ca0855ef2eb9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Feb 16 14:28:41 2010 +0100 ntdll: Fix the return status of NtQueryValueKey for a too small buffer. --- dlls/kernel32/except.c | 2 +- dlls/kernel32/path.c | 2 +- dlls/ntdll/reg.c | 27 ++++++++++++--------------- dlls/ntdll/tests/reg.c | 19 +++++++++++++++++-- 4 files changed, 31 insertions(+), 19 deletions(-) diff --git a/dlls/kernel32/except.c b/dlls/kernel32/except.c index 6ed88ad..de07442 100644 --- a/dlls/kernel32/except.c +++ b/dlls/kernel32/except.c @@ -220,7 +220,7 @@ static BOOL start_debugger(PEXCEPTION_POINTERS epointers, HANDLE hEvent) RtlInitUnicodeString( &nameW, DebuggerW ); if (NtQueryValueKey( hDbgConf, &nameW, KeyValuePartialInformation, - NULL, 0, &format_size ) == STATUS_BUFFER_OVERFLOW) + NULL, 0, &format_size ) == STATUS_BUFFER_TOO_SMALL) { char *data = HeapAlloc(GetProcessHeap(), 0, format_size); NtQueryValueKey( hDbgConf, &nameW, KeyValuePartialInformation, diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c index d77ecc1..2b69e8c 100644 --- a/dlls/kernel32/path.c +++ b/dlls/kernel32/path.c @@ -182,7 +182,7 @@ static BOOL add_boot_rename_entry( LPCWSTR source, LPCWSTR dest, DWORD flags ) /* First we check if the key exists and if so how many bytes it already contains. */ if (NtQueryValueKey( Reboot, &nameW, KeyValuePartialInformation, - NULL, 0, &DataSize ) == STATUS_BUFFER_OVERFLOW) + NULL, 0, &DataSize ) == STATUS_BUFFER_TOO_SMALL) { if (!(Buffer = HeapAlloc( GetProcessHeap(), 0, DataSize + len1 + len2 + sizeof(WCHAR) ))) goto Quit; diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c index 50ec081..9b3aae5 100644 --- a/dlls/ntdll/reg.c +++ b/dlls/ntdll/reg.c @@ -477,7 +477,7 @@ NTSTATUS WINAPI NtQueryValueKey( HANDLE handle, const UNICODE_STRING *name, { NTSTATUS ret; UCHAR *data_ptr; - unsigned int fixed_size = 0; + unsigned int fixed_size = 0, min_size = 0; TRACE( "(%p,%s,%d,%p,%d)\n", handle, debugstr_us(name), info_class, info, length ); @@ -489,30 +489,26 @@ NTSTATUS WINAPI NtQueryValueKey( HANDLE handle, const UNICODE_STRING *name, case KeyValueBasicInformation: { KEY_VALUE_BASIC_INFORMATION *basic_info = info; - if (FIELD_OFFSET(KEY_VALUE_BASIC_INFORMATION, Name) < length) - { - memcpy(basic_info->Name, name->Buffer, - min(length - FIELD_OFFSET(KEY_VALUE_BASIC_INFORMATION, Name), name->Length)); - } - fixed_size = FIELD_OFFSET(KEY_VALUE_BASIC_INFORMATION, Name) + name->Length; + min_size = FIELD_OFFSET(KEY_VALUE_BASIC_INFORMATION, Name); + fixed_size = min_size + name->Length; + if (min_size < length) + memcpy(basic_info->Name, name->Buffer, min(length - min_size, name->Length)); data_ptr = NULL; break; } case KeyValueFullInformation: { KEY_VALUE_FULL_INFORMATION *full_info = info; - if (FIELD_OFFSET(KEY_VALUE_FULL_INFORMATION, Name) < length) - { - memcpy(full_info->Name, name->Buffer, - min(length - FIELD_OFFSET(KEY_VALUE_FULL_INFORMATION, Name), name->Length)); - } + min_size = FIELD_OFFSET(KEY_VALUE_FULL_INFORMATION, Name); + fixed_size = min_size + name->Length; + if (min_size < length) + memcpy(full_info->Name, name->Buffer, min(length - min_size, name->Length)); data_ptr = (UCHAR *)full_info->Name + name->Length; - fixed_size = (char *)data_ptr - (char *)info; break; } case KeyValuePartialInformation: + min_size = fixed_size = FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data); data_ptr = ((KEY_VALUE_PARTIAL_INFORMATION *)info)->Data; - fixed_size = (char *)data_ptr - (char *)info; break; default: FIXME( "Information class %d not implemented\n", info_class ); @@ -529,7 +525,8 @@ NTSTATUS WINAPI NtQueryValueKey( HANDLE handle, const UNICODE_STRING *name, copy_key_value_info( info_class, info, length, reply->type, name->Length, reply->total ); *result_len = fixed_size + (info_class == KeyValueBasicInformation ? 0 : reply->total); - if (length < *result_len) ret = STATUS_BUFFER_OVERFLOW; + if (length < min_size) ret = STATUS_BUFFER_TOO_SMALL; + else if (length < *result_len) ret = STATUS_BUFFER_OVERFLOW; } } SERVER_END_REQ; diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 3521065..67bd125 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -480,7 +480,7 @@ static void test_NtQueryValueKey(void) KEY_VALUE_BASIC_INFORMATION *basic_info; KEY_VALUE_PARTIAL_INFORMATION *partial_info; KEY_VALUE_FULL_INFORMATION *full_info; - DWORD len; + DWORD len, expected; pRtlCreateUnicodeStringFromAsciiz(&ValName, "deletetest"); @@ -554,7 +554,7 @@ static void test_NtQueryValueKey(void) 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); + 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(partial_info, 0xbd, len+1); status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, len, &len); @@ -564,6 +564,21 @@ static void test_NtQueryValueKey(void) 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)); + + expected = len; + status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, 0, &len); + ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryValueKey wrong status 0x%08x\n", status); + ok(len == expected, "NtQueryValueKey wrong len %u\n", len); + status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, 1, &len); + ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryValueKey wrong status 0x%08x\n", status); + ok(len == expected, "NtQueryValueKey wrong len %u\n", len); + status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data) - 1, &len); + ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryValueKey wrong status 0x%08x\n", status); + ok(len == expected, "NtQueryValueKey wrong len %u\n", len); + status = pNtQueryValueKey(key, &ValName, KeyValuePartialInformation, partial_info, FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data), &len); + ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey wrong status 0x%08x\n", status); + ok(len == expected, "NtQueryValueKey wrong len %u\n", len); + HeapFree(GetProcessHeap(), 0, partial_info); pRtlFreeUnicodeString(&ValName);
1
0
0
0
Alexandre Julliard : winex11: Fix the DC rect offset for a released DC.
by Alexandre Julliard
16 Feb '10
16 Feb '10
Module: wine Branch: master Commit: bcf88b58856637288862a9167ad2e0b31c00eddb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bcf88b58856637288862a9167…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Feb 16 12:37:42 2010 +0100 winex11: Fix the DC rect offset for a released DC. --- dlls/winex11.drv/window.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 93cb7c7..e46a06b 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1956,6 +1956,7 @@ void CDECL X11DRV_ReleaseDC( HWND hwnd, HDC hdc ) escape.drawable_rect = virtual_screen_rect; SetRect( &escape.dc_rect, 0, 0, virtual_screen_rect.right - virtual_screen_rect.left, virtual_screen_rect.bottom - virtual_screen_rect.top ); + OffsetRect( &escape.dc_rect, -escape.drawable_rect.left, -escape.drawable_rect.top ); escape.fbconfig_id = 0; escape.gl_drawable = 0; escape.pixmap = 0;
1
0
0
0
Marcus Meissner : gdiplus: Dereference texture after checking it for NULL ( Coverity).
by Alexandre Julliard
16 Feb '10
16 Feb '10
Module: wine Branch: master Commit: 21b90492316314cba03a181918f2bae58ea4eea8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21b90492316314cba03a18191…
Author: Marcus Meissner <meissner(a)suse.de> Date: Tue Feb 16 11:54:48 2010 +0100 gdiplus: Dereference texture after checking it for NULL (Coverity). --- dlls/gdiplus/brush.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index c867f91..abcc47f 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -801,11 +801,11 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image, TRACE("(%p, %p, %.2f, %.2f, %.2f, %.2f, %p)\n", image, imageattr, x, y, width, height, texture); - *texture = NULL; - if(!image || !texture || x < 0.0 || y < 0.0 || width < 0.0 || height < 0.0) return InvalidParameter; + *texture = NULL; + if(image->type != ImageTypeBitmap){ FIXME("not implemented for image type %d\n", image->type); return NotImplemented;
1
0
0
0
Kusanagi Kouichi : winex11.drv: Show the default IME window only when necessary.
by Alexandre Julliard
16 Feb '10
16 Feb '10
Module: wine Branch: master Commit: e5f0cdfcf6ba1595346c4c9ed1a7cbf3de418c8e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e5f0cdfcf6ba1595346c4c9ed…
Author: Kusanagi Kouichi <slash(a)ac.auone-net.jp> Date: Tue Feb 16 20:06:11 2010 +0900 winex11.drv: Show the default IME window only when necessary. --- dlls/winex11.drv/ime.c | 25 ++++++++----------------- 1 files changed, 8 insertions(+), 17 deletions(-) diff --git a/dlls/winex11.drv/ime.c b/dlls/winex11.drv/ime.c index affa435..0f99ad6 100644 --- a/dlls/winex11.drv/ime.c +++ b/dlls/winex11.drv/ime.c @@ -87,7 +87,6 @@ static UINT WM_MSIME_DOCUMENTFEED; static LRESULT WINAPI IME_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); -static void UpdateDataInDefaultIMEWindow(HIMC hHIMC, HWND hwnd, BOOL showable); static HIMC RealIMC(HIMC hIMC) { @@ -933,8 +932,6 @@ BOOL WINAPI ImeSetCompositionString(HIMC hIMC, DWORD dwIndex, LPCVOID lpComp, } } - UpdateDataInDefaultIMEWindow(hIMC, myPrivate->hwndDefault,FALSE); - GenerateIMEMessage(hIMC, WM_IME_COMPOSITION, wParam, flags); ImmUnlockIMCC(lpIMC->hPrivate); UnlockRealIMC(hIMC); @@ -1199,7 +1196,7 @@ static void PaintDefaultIMEWnd(HIMC hIMC, HWND hwnd) UnlockRealIMC(hIMC); } -static void UpdateDataInDefaultIMEWindow(HIMC hIMC, HWND hwnd, BOOL showable) +static void UpdateDefaultIMEWindow(HIMC hIMC, HWND hwnd) { LPCOMPOSITIONSTRING compstr; LPINPUTCONTEXT lpIMC; @@ -1215,14 +1212,16 @@ static void UpdateDataInDefaultIMEWindow(HIMC hIMC, HWND hwnd, BOOL showable) if (compstr == NULL || compstr->dwCompStrLen == 0) ShowWindow(hwnd,SW_HIDE); - else if (showable) + else + { ShowWindow(hwnd,SW_SHOWNOACTIVATE); - - RedrawWindow(hwnd,NULL,NULL,RDW_ERASENOW|RDW_INVALIDATE); + RedrawWindow(hwnd, NULL, NULL, RDW_ERASENOW | RDW_INVALIDATE); + } if (compstr != NULL) ImmUnlockIMCC(lpIMC->hCompStr); + lpIMC->hWnd = GetFocus(); UnlockRealIMC(hIMC); } @@ -1255,21 +1254,13 @@ static void DefaultIMEComposition(HIMC hIMC, HWND hwnd, LPARAM lParam) UnlockRealIMC(hIMC); } else - UpdateDataInDefaultIMEWindow(hIMC,hwnd,TRUE); + UpdateDefaultIMEWindow(hIMC, hwnd); } static void DefaultIMEStartComposition(HIMC hIMC, HWND hwnd ) { - LPINPUTCONTEXT lpIMC; - - lpIMC = LockRealIMC(hIMC); - if (lpIMC == NULL) - return; - TRACE("IME message WM_IME_STARTCOMPOSITION\n"); - lpIMC->hWnd = GetFocus(); - ShowWindow(hwnd,SW_SHOWNOACTIVATE); - UnlockRealIMC(hIMC); + UpdateDefaultIMEWindow(hIMC, hwnd); } static LRESULT ImeHandleNotify(HIMC hIMC, HWND hwnd, UINT msg, WPARAM wParam,
1
0
0
0
Hans Leidekker : msi: Only run the CreateFolder and RemoveFolder actions when the component is set to be installed or removed , respectively.
by Alexandre Julliard
16 Feb '10
16 Feb '10
Module: wine Branch: master Commit: 9cbb80d984db6077a426182d29f62a1871b778ce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9cbb80d984db6077a426182d2…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Feb 16 11:45:34 2010 +0100 msi: Only run the CreateFolder and RemoveFolder actions when the component is set to be installed or removed, respectively. --- dlls/msi/action.c | 32 ++++++++++++++++++++++++++++++-- dlls/msi/tests/install.c | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 64 insertions(+), 4 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 7bb4e52..2c036b8 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -886,10 +886,24 @@ static BOOL ACTION_HandleCustomAction( MSIPACKAGE* package, LPCWSTR action, static UINT ITERATE_CreateFolders(MSIRECORD *row, LPVOID param) { MSIPACKAGE *package = param; - LPCWSTR dir; + LPCWSTR dir, component; LPWSTR full_path; MSIRECORD *uirow; MSIFOLDER *folder; + MSICOMPONENT *comp; + + component = MSI_RecordGetString(row, 2); + comp = get_loaded_component(package, component); + if (!comp) + return ERROR_SUCCESS; + + if (comp->ActionRequest != INSTALLSTATE_LOCAL) + { + TRACE("Component not scheduled for installation: %s\n", debugstr_w(component)); + comp->Action = comp->Installed; + return ERROR_SUCCESS; + } + comp->Action = INSTALLSTATE_LOCAL; dir = MSI_RecordGetString(row,1); if (!dir) @@ -983,10 +997,24 @@ static UINT ACTION_CreateFolders(MSIPACKAGE *package) static UINT ITERATE_RemoveFolders( MSIRECORD *row, LPVOID param ) { MSIPACKAGE *package = param; - LPCWSTR dir; + LPCWSTR dir, component; LPWSTR full_path; MSIRECORD *uirow; MSIFOLDER *folder; + MSICOMPONENT *comp; + + component = MSI_RecordGetString(row, 2); + comp = get_loaded_component(package, component); + if (!comp) + return ERROR_SUCCESS; + + if (comp->ActionRequest != INSTALLSTATE_ABSENT) + { + TRACE("Component not scheduled for removal: %s\n", debugstr_w(component)); + comp->Action = comp->Installed; + return ERROR_SUCCESS; + } + comp->Action = INSTALLSTATE_ABSENT; dir = MSI_RecordGetString( row, 1 ); if (!dir) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 8eb2b73..44eec8e 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -1091,7 +1091,7 @@ static const CHAR aup_custom_action_dat[] = "Action\tType\tSource\tTarget\tISCom static const CHAR cf_create_folders_dat[] = "Directory_\tComponent_\n" "s72\ts72\n" "CreateFolder\tDirectory_\tComponent_\n" - "MSITESTDIR\tOne\n"; + "FIRSTDIR\tOne\n"; static const CHAR cf_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" "s72\tS255\tI2\n" @@ -7857,7 +7857,23 @@ static void test_create_folder(void) ok(!delete_pf("msitest\\filename", TRUE), "File installed\n"); ok(!delete_pf("msitest\\one.txt", TRUE), "File installed\n"); ok(!delete_pf("msitest\\service.exe", TRUE), "File installed\n"); - todo_wine ok(!delete_pf("msitest", FALSE), "Directory created\n"); + ok(!delete_pf("msitest", FALSE), "Directory created\n"); + + r = MsiInstallProductA(msifile, "LOCAL=Two"); + ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); + + ok(!delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\cabout\\new", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\cabout\\four.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\cabout", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\changed\\three.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\changed", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\first\\two.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\first", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\filename", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\one.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\service.exe", TRUE), "File installed\n"); + ok(!delete_pf("msitest", FALSE), "Directory created\n"); delete_test_files(); } @@ -7887,6 +7903,22 @@ static void test_remove_folder(void) ok(!delete_pf("msitest\\service.exe", TRUE), "File installed\n"); ok(!delete_pf("msitest", FALSE), "Directory created\n"); + r = MsiInstallProductA(msifile, "LOCAL=Two"); + ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r); + + ok(!delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\cabout\\new", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\cabout\\four.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\cabout", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\changed\\three.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\changed", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\first\\two.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\first", FALSE), "Directory created\n"); + ok(!delete_pf("msitest\\filename", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\one.txt", TRUE), "File installed\n"); + ok(!delete_pf("msitest\\service.exe", TRUE), "File installed\n"); + ok(!delete_pf("msitest", FALSE), "Directory created\n"); + delete_test_files(); }
1
0
0
0
Hans Leidekker : msi: Get rid of ACTION_VerifyFeatureForAction.
by Alexandre Julliard
16 Feb '10
16 Feb '10
Module: wine Branch: master Commit: c32d9d7004e51be50a405dc69b671dbb3ca3a7b2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c32d9d7004e51be50a405dc69…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Feb 16 11:45:05 2010 +0100 msi: Get rid of ACTION_VerifyFeatureForAction. --- dlls/msi/action.c | 11 +++++------ dlls/msi/classes.c | 23 ++++++++++++----------- dlls/msi/helpers.c | 11 ----------- dlls/msi/msipriv.h | 1 - 4 files changed, 17 insertions(+), 29 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index f9823fe..7bb4e52 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -2619,7 +2619,7 @@ static void ACTION_RefCountComponent( MSIPACKAGE* package, MSICOMPONENT *comp ) { ComponentList *cl; - if (!ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_LOCAL )) + if (feature->ActionRequest != INSTALLSTATE_LOCAL) continue; LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry ) @@ -2634,7 +2634,7 @@ static void ACTION_RefCountComponent( MSIPACKAGE* package, MSICOMPONENT *comp ) { ComponentList *cl; - if (!ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_ABSENT )) + if (feature->ActionRequest != INSTALLSTATE_ABSENT) continue; LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry ) @@ -3922,10 +3922,9 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package) BOOL absent = FALSE; MSIRECORD *uirow; - if (!ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_LOCAL ) && - !ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_SOURCE ) && - !ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_ADVERTISED )) - absent = TRUE; + if (feature->ActionRequest != INSTALLSTATE_LOCAL && + feature->ActionRequest != INSTALLSTATE_SOURCE && + feature->ActionRequest != INSTALLSTATE_ADVERTISED) absent = TRUE; size = 1; LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry ) diff --git a/dlls/msi/classes.c b/dlls/msi/classes.c index 6ca35b9..acd8429 100644 --- a/dlls/msi/classes.c +++ b/dlls/msi/classes.c @@ -809,16 +809,17 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package) continue; feature = cls->Feature; + if (!feature) + continue; /* * MSDN says that these are based on Feature not on Component. */ - if (!ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_LOCAL ) && - !ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_ADVERTISED )) + if (feature->ActionRequest != INSTALLSTATE_LOCAL && + feature->ActionRequest != INSTALLSTATE_ADVERTISED ) { - TRACE("Skipping class %s reg due to disabled feature %s\n", - debugstr_w(cls->clsid), debugstr_w(feature->Feature)); - + TRACE("Feature %s not scheduled for installation, skipping regstration of class %s\n", + debugstr_w(feature->Feature), debugstr_w(cls->clsid)); continue; } @@ -1142,18 +1143,18 @@ UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package) continue; feature = ext->Feature; + if (!feature) + continue; /* * yes. MSDN says that these are based on _Feature_ not on * Component. So verify the feature is to be installed */ - if ((!ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_LOCAL )) && - !(install_on_demand && - ACTION_VerifyFeatureForAction( feature, INSTALLSTATE_ADVERTISED ))) + if (feature->ActionRequest != INSTALLSTATE_LOCAL && + !(install_on_demand && feature->ActionRequest == INSTALLSTATE_ADVERTISED)) { - TRACE("Skipping extension %s reg due to disabled feature %s\n", - debugstr_w(ext->Extension), debugstr_w(feature->Feature)); - + TRACE("Feature %s not scheduled for installation, skipping registration of extension %s\n", + debugstr_w(feature->Feature), debugstr_w(ext->Extension)); continue; } diff --git a/dlls/msi/helpers.c b/dlls/msi/helpers.c index df25c3e..e763a11 100644 --- a/dlls/msi/helpers.c +++ b/dlls/msi/helpers.c @@ -604,17 +604,6 @@ void ui_actiondata(MSIPACKAGE *package, LPCWSTR action, MSIRECORD * record) msiobj_release(&row->hdr); } -BOOL ACTION_VerifyFeatureForAction( const MSIFEATURE* feature, INSTALLSTATE check ) -{ - if (!feature) - return FALSE; - - if (feature->ActionRequest == check) - return TRUE; - else - return FALSE; -} - void reduce_to_longfilename(WCHAR* filename) { LPWSTR p = strchrW(filename,'|'); diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 8c77a9f..5ea707f 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -982,7 +982,6 @@ extern void msi_free_action_script(MSIPACKAGE *package, UINT script); extern LPWSTR build_icon_path(MSIPACKAGE *, LPCWSTR); extern LPWSTR build_directory_name(DWORD , ...); extern BOOL create_full_pathW(const WCHAR *path); -extern BOOL ACTION_VerifyFeatureForAction(const MSIFEATURE*, INSTALLSTATE); extern void reduce_to_longfilename(WCHAR*); extern LPWSTR create_component_advertise_string(MSIPACKAGE*, MSICOMPONENT*, LPCWSTR); extern void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature);
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
...
79
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
75
76
77
78
79
Results per page:
10
25
50
100
200