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
June 2011
----- 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
809 discussions
Start a n
N
ew thread
Alexandre Julliard : advapi32: Fix the parameter checks in QueryServiceStatusEx.
by Alexandre Julliard
10 Jun '11
10 Jun '11
Module: wine Branch: master Commit: 519fbf620230882bec91a94789bfab2ae907fb7d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=519fbf620230882bec91a9478…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 9 21:40:08 2011 +0200 advapi32: Fix the parameter checks in QueryServiceStatusEx. --- dlls/advapi32/service.c | 23 +++++++++++++++++------ dlls/advapi32/tests/service.c | 16 ++++++---------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c index 2b37338..1674c6f 100644 --- a/dlls/advapi32/service.c +++ b/dlls/advapi32/service.c @@ -1172,21 +1172,32 @@ BOOL WINAPI QueryServiceStatusEx(SC_HANDLE hService, SC_STATUS_TYPE InfoLevel, TRACE("%p %d %p %d %p\n", hService, InfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded); - __TRY + if (InfoLevel != SC_STATUS_PROCESS_INFO) { - err = svcctl_QueryServiceStatusEx(hService, InfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded); + err = ERROR_INVALID_LEVEL; } - __EXCEPT(rpc_filter) + else if (cbBufSize < sizeof(SERVICE_STATUS_PROCESS)) { - err = map_exception_code(GetExceptionCode()); + *pcbBytesNeeded = sizeof(SERVICE_STATUS_PROCESS); + err = ERROR_INSUFFICIENT_BUFFER; + } + else + { + __TRY + { + err = svcctl_QueryServiceStatusEx(hService, InfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded); + } + __EXCEPT(rpc_filter) + { + err = map_exception_code(GetExceptionCode()); + } + __ENDTRY } - __ENDTRY if (err != ERROR_SUCCESS) { SetLastError(err); return FALSE; } - return TRUE; } diff --git a/dlls/advapi32/tests/service.c b/dlls/advapi32/tests/service.c index e86208f..e243db0 100644 --- a/dlls/advapi32/tests/service.c +++ b/dlls/advapi32/tests/service.c @@ -956,7 +956,6 @@ static void test_query_svc(void) SetLastError(0xdeadbeef); ret = pQueryServiceStatusEx(NULL, 1, NULL, 0, NULL); ok(!ret, "Expected failure\n"); - todo_wine ok(GetLastError() == ERROR_INVALID_LEVEL, "Expected ERROR_INVALID_LEVEL, got %d\n", GetLastError()); @@ -966,8 +965,8 @@ static void test_query_svc(void) /* Only info level is correct. It looks like the buffer/size is checked second */ SetLastError(0xdeadbeef); - ret = pQueryServiceStatusEx(NULL, 0, NULL, 0, &needed); - /* NT4 and Wine check the handle first */ + ret = pQueryServiceStatusEx(NULL, SC_STATUS_PROCESS_INFO, NULL, 0, &needed); + /* NT4 checks the handle first */ if (GetLastError() != ERROR_INVALID_HANDLE) { ok(!ret, "Expected failure\n"); @@ -981,7 +980,7 @@ static void test_query_svc(void) statusproc = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE_STATUS_PROCESS)); bufsize = needed; SetLastError(0xdeadbeef); - ret = pQueryServiceStatusEx(NULL, 0, (BYTE*)statusproc, bufsize, &needed); + ret = pQueryServiceStatusEx(NULL, SC_STATUS_PROCESS_INFO, (BYTE*)statusproc, bufsize, &needed); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); @@ -989,25 +988,22 @@ static void test_query_svc(void) /* Correct handle and info level */ SetLastError(0xdeadbeef); - ret = pQueryServiceStatusEx(svc_handle, 0, NULL, 0, &needed); + ret = pQueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, NULL, 0, &needed); /* NT4 doesn't return the needed size */ if (GetLastError() != ERROR_INVALID_PARAMETER) { ok(!ret, "Expected failure\n"); - todo_wine - { ok(needed == sizeof(SERVICE_STATUS_PROCESS), "Needed buffersize is wrong : %d\n", needed); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - } } /* All parameters are OK but we don't have enough rights */ statusproc = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE_STATUS_PROCESS)); bufsize = sizeof(SERVICE_STATUS_PROCESS); SetLastError(0xdeadbeef); - ret = pQueryServiceStatusEx(svc_handle, 0, (BYTE*)statusproc, bufsize, &needed); + ret = pQueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, (BYTE*)statusproc, bufsize, &needed); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); @@ -1021,7 +1017,7 @@ static void test_query_svc(void) statusproc = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE_STATUS_PROCESS)); bufsize = sizeof(SERVICE_STATUS_PROCESS); SetLastError(0xdeadbeef); - ret = pQueryServiceStatusEx(svc_handle, 0, (BYTE*)statusproc, bufsize, &needed); + ret = pQueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, (BYTE*)statusproc, bufsize, &needed); ok(ret, "Expected success, got error %u\n", GetLastError()); if (statusproc->dwCurrentState == SERVICE_RUNNING) ok(statusproc->dwProcessId != 0,
1
0
0
0
Alexandre Julliard : dispex: Make sure we don' t pass a NULL array to IDispatchEx_InvokeEx.
by Alexandre Julliard
10 Jun '11
10 Jun '11
Module: wine Branch: master Commit: a2f987c338ceea52e88c6e18cafc9de4f94471ec URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a2f987c338ceea52e88c6e18c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 9 20:55:49 2011 +0200 dispex: Make sure we don't pass a NULL array to IDispatchEx_InvokeEx. --- dlls/dispex/usrmarshal.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/dispex/usrmarshal.c b/dlls/dispex/usrmarshal.c index cc72469..2fcba52 100644 --- a/dlls/dispex/usrmarshal.c +++ b/dlls/dispex/usrmarshal.c @@ -47,9 +47,9 @@ HRESULT CALLBACK IDispatchEx_InvokeEx_Proxy(IDispatchEx* This, DISPID id, LCID l HRESULT hr; VARIANT result; EXCEPINFO excep_info; - UINT byref_args, arg; + UINT byref_args, arg, dummy_idx; VARIANT dummy_arg, *ref_arg = &dummy_arg, *copy_arg, *orig_arg = NULL; - UINT *ref_idx = NULL; + UINT *ref_idx = &dummy_idx; DWORD dword_flags = wFlags & 0xf; TRACE("(%p)->(%08x, %04x, %04x, %p, %p, %p, %p)\n", This, id, lcid, wFlags,
1
0
0
0
Owen Rudge : winemapi: Ensure address is valid before checking for 'smtp:'.
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: 7cd20a413e1ab212f032269e4025aba18d0292af URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7cd20a413e1ab212f032269e4…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Thu Jun 9 16:27:43 2011 +0100 winemapi: Ensure address is valid before checking for 'smtp:'. --- dlls/winemapi/sendmail.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/winemapi/sendmail.c b/dlls/winemapi/sendmail.c index e4629bb..93f0569 100644 --- a/dlls/winemapi/sendmail.c +++ b/dlls/winemapi/sendmail.c @@ -87,11 +87,12 @@ ULONG WINAPI MAPISendMail(LHANDLE session, ULONG_PTR uiparam, } address = message->lpRecips[i].lpszAddress; - if (!strncasecmp(address, smtp, sizeof(smtp) - 1)) - address += sizeof(smtp) - 1; if (address) { + if (!strncasecmp(address, smtp, sizeof(smtp) - 1)) + address += sizeof(smtp) - 1; + switch (message->lpRecips[i].ulRecipClass) { case MAPI_ORIG: @@ -172,11 +173,12 @@ ULONG WINAPI MAPISendMail(LHANDLE session, ULONG_PTR uiparam, for (i = 0; i < message->nRecipCount; i++) { address = message->lpRecips[i].lpszAddress; - if (!strncasecmp(address, smtp, sizeof(smtp) - 1)) - address += sizeof(smtp) - 1; if (address) { + if (!strncasecmp(address, smtp, sizeof(smtp) - 1)) + address += sizeof(smtp) - 1; + switch (message->lpRecips[i].ulRecipClass) { case MAPI_TO:
1
0
0
0
Juan Lang : crypt32: Support CERT_COMPARE_NAME_STR_A in CertFindCertificateInStore.
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: f1be598efacde1c6faa4c471e6bad23d319ef842 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f1be598efacde1c6faa4c471e…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Wed Jun 8 18:22:22 2011 -0700 crypt32: Support CERT_COMPARE_NAME_STR_A in CertFindCertificateInStore. --- dlls/crypt32/cert.c | 36 ++++++++++++++++++++++++++++++++++-- 1 files changed, 34 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c index 12c013e..75b0e12 100644 --- a/dlls/crypt32/cert.c +++ b/dlls/crypt32/cert.c @@ -1516,7 +1516,36 @@ static BOOL compare_cert_by_name_str(PCCERT_CONTEXT pCertContext, return ret; } -static PCCERT_CONTEXT find_cert_by_name_str(HCERTSTORE store, DWORD dwType, +static PCCERT_CONTEXT find_cert_by_name_str_a(HCERTSTORE store, DWORD dwType, + DWORD dwFlags, const void *pvPara, PCCERT_CONTEXT prev) +{ + PCCERT_CONTEXT found = NULL; + + TRACE("%s\n", debugstr_a(pvPara)); + + if (pvPara) + { + int len = MultiByteToWideChar(CP_ACP, 0, pvPara, -1, NULL, 0); + LPWSTR str = CryptMemAlloc(len * sizeof(WCHAR)); + + if (str) + { + LPWSTR ptr; + + MultiByteToWideChar(CP_ACP, 0, pvPara, -1, str, len); + for (ptr = str; *ptr; ptr++) + *ptr = tolowerW(*ptr); + found = cert_compare_certs_in_store(store, prev, + compare_cert_by_name_str, dwType, dwFlags, str); + CryptMemFree(str); + } + } + else + found = find_cert_any(store, dwType, dwFlags, NULL, prev); + return found; +} + +static PCCERT_CONTEXT find_cert_by_name_str_w(HCERTSTORE store, DWORD dwType, DWORD dwFlags, const void *pvPara, PCCERT_CONTEXT prev) { PCCERT_CONTEXT found = NULL; @@ -1574,8 +1603,11 @@ PCCERT_CONTEXT WINAPI CertFindCertificateInStore(HCERTSTORE hCertStore, case CERT_COMPARE_PUBLIC_KEY: compare = compare_cert_by_public_key; break; + case CERT_COMPARE_NAME_STR_A: + find = find_cert_by_name_str_a; + break; case CERT_COMPARE_NAME_STR_W: - find = find_cert_by_name_str; + find = find_cert_by_name_str_w; break; case CERT_COMPARE_SUBJECT_CERT: compare = compare_cert_by_subject_cert;
1
0
0
0
Jacek Caban : urlmon: Added empty file binding test.
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: 224db0d3544cdf6bd978bad44fdb542e039eb351 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=224db0d3544cdf6bd978bad44…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jun 9 14:04:00 2011 +0200 urlmon: Added empty file binding test. --- dlls/urlmon/tests/protocol.c | 36 +++++++++++++++++++++++++++++------- 1 files changed, 29 insertions(+), 7 deletions(-) diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/protocol.c index 4ca6da1..b547ad8 100644 --- a/dlls/urlmon/tests/protocol.c +++ b/dlls/urlmon/tests/protocol.c @@ -152,6 +152,7 @@ static PROTOCOLDATA protocoldata, *pdata, continue_protdata; static DWORD prot_read, pi, filter_state, http_post_test, thread_id; static BOOL security_problem, test_async_req, impl_protex; static BOOL async_read_pending, mimefilter_test, direct_read, wait_for_switch, emulate_prot, short_read, test_abort; +static BOOL empty_file; enum { STATE_CONNECTING, @@ -593,7 +594,7 @@ static void call_continue(PROTOCOLDATA *protocol_data) case STATE_STARTDOWNLOADING: if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST) { SET_EXPECT(OnResponse); - if(tested_protocol == HTTPS_TEST || test_redirect || test_abort) + if(tested_protocol == HTTPS_TEST || test_redirect || test_abort || empty_file) SET_EXPECT(ReportProgress_ACCEPTRANGES); SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE); if(bindf & BINDF_NEEDFILE) @@ -624,9 +625,9 @@ static void call_continue(PROTOCOLDATA *protocol_data) state = STATE_DOWNLOADING; if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST) { CHECK_CALLED(OnResponse); - if(tested_protocol == HTTPS_TEST) + if(tested_protocol == HTTPS_TEST || empty_file) CHECK_CALLED(ReportProgress_ACCEPTRANGES); - else if(test_redirect) + else if(test_redirect || test_abort) CLEAR_CALLED(ReportProgress_ACCEPTRANGES); CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE); if(bindf & BINDF_NEEDFILE) @@ -705,6 +706,8 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface, ok(lstrlenW(text_plain) <= lstrlenW(szStatusText) && !memcmp(szStatusText, text_plain, lstrlenW(text_plain)*sizeof(WCHAR)), "szStatusText != text/plain\n"); + else if(empty_file) + ok(!strcmp_wa(szStatusText, "application/javascript"), "szStatusText = %s\n", wine_dbgstr_w(szStatusText)); else if(!mimefilter_test) ok(lstrlenW(text_htmlW) <= lstrlenW(szStatusText) && !memcmp(szStatusText, text_htmlW, lstrlenW(text_htmlW)*sizeof(WCHAR)), @@ -755,7 +758,7 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface, CHECK_EXPECT(ReportProgress_VERIFIEDMIMETYPEAVAILABLE); ok(szStatusText != NULL, "szStatusText == NULL\n"); if(szStatusText) - ok(!lstrcmpW(szStatusText, text_htmlW), "szStatusText != text/html\n"); + ok(!strcmp_wa(szStatusText, "text/html"), "szStatusText != text/html\n"); break; case BINDSTATUS_PROTOCOLCLASSID: CHECK_EXPECT(ReportProgress_PROTOCOLCLASSID); @@ -896,14 +899,25 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR } }else if(!binding_test && (tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST || tested_protocol == FTP_TEST)) { - if(!(grfBSCF & BSCF_LASTDATANOTIFICATION) || (grfBSCF & BSCF_DATAFULLYAVAILABLE)) + if(empty_file) + CHECK_EXPECT2(ReportData); + else if(!(grfBSCF & BSCF_LASTDATANOTIFICATION) || (grfBSCF & BSCF_DATAFULLYAVAILABLE)) CHECK_EXPECT(ReportData); else if (http_post_test) ok(ulProgress == 13, "Read %u bytes instead of 13\n", ulProgress); - ok(ulProgress, "ulProgress == 0\n"); + if(empty_file) { + ok(!ulProgress, "ulProgress = %d\n", ulProgress); + ok(!ulProgressMax, "ulProgressMax = %d\n", ulProgressMax); + }else { + ok(ulProgress, "ulProgress == 0\n"); + } - if(first_data_notif) { + if(empty_file) { + ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION), + "grcfBSCF = %08x\n", grfBSCF); + first_data_notif = FALSE; + }else if(first_data_notif) { ok(grfBSCF == BSCF_FIRSTDATANOTIFICATION || grfBSCF == (BSCF_LASTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE), "grcfBSCF = %08x\n", grfBSCF); @@ -2169,6 +2183,7 @@ static IClassFactory mimefilter_cf = { &MimeFilterCFVtbl }; #define TEST_ASYNCREQ 0x0200 #define TEST_USEIURI 0x0400 #define TEST_IMPLPROTEX 0x0800 +#define TEST_EMPTY 0x1000 static void register_filter(BOOL do_register) { @@ -2220,6 +2235,7 @@ static void init_test(int prot, DWORD flags) test_redirect = (flags & TEST_REDIRECT) != 0; test_abort = (flags & TEST_ABORT) != 0; impl_protex = (flags & TEST_IMPLPROTEX) != 0; + empty_file = (flags & TEST_EMPTY) != 0; register_filter(mimefilter_test); } @@ -2872,6 +2888,9 @@ static void test_http_protocol(void) static const WCHAR winetest_url[] = {'h','t','t','p',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g','/', 't','e','s','t','s','/','d','a','t','a','.','p','h','p',0}; + static const WCHAR empty_url[] = + {'h','t','t','p',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g','/', + 't','e','s','t','s','/','e','m','p','t','y','.','j','s',0}; trace("Testing http protocol (not from urlmon)...\n"); bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; @@ -2900,6 +2919,9 @@ static void test_http_protocol(void) bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON; test_http_protocol_url(redirect_url, HTTP_TEST, TEST_REDIRECT, TYMED_NULL); + trace("Testing http protocol empty file...\n"); + test_http_protocol_url(empty_url, HTTP_TEST, TEST_EMPTY, TYMED_NULL); + trace("Testing http protocol abort...\n"); test_http_protocol_url(winetest_url, HTTP_TEST, TEST_ABORT, TYMED_NULL);
1
0
0
0
Jacek Caban : urlmon: Correctly handle empty files.
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: 66917c61d6e61c97941ff0f1d09b3855fcb1fd9e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=66917c61d6e61c97941ff0f1d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jun 9 14:03:13 2011 +0200 urlmon: Correctly handle empty files. --- dlls/urlmon/protocol.c | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/dlls/urlmon/protocol.c b/dlls/urlmon/protocol.c index 326564b..94801ae 100644 --- a/dlls/urlmon/protocol.c +++ b/dlls/urlmon/protocol.c @@ -286,6 +286,7 @@ HRESULT protocol_start(Protocol *protocol, IInternetProtocol *prot, IUri *uri, HRESULT protocol_continue(Protocol *protocol, PROTOCOLDATA *data) { + BOOL is_start; HRESULT hres; if (!data) { @@ -293,6 +294,8 @@ HRESULT protocol_continue(Protocol *protocol, PROTOCOLDATA *data) return S_OK; } + is_start = data->pData == (LPVOID)BINDSTATUS_DOWNLOADINGDATA; + if(!protocol->request) { WARN("Expected request to be non-NULL\n"); return S_OK; @@ -312,7 +315,7 @@ HRESULT protocol_continue(Protocol *protocol, PROTOCOLDATA *data) if(protocol->post_stream) return write_post_stream(protocol); - if(data->pData == (LPVOID)BINDSTATUS_DOWNLOADINGDATA) { + if(is_start) { hres = protocol->vtbl->start_downloading(protocol); if(FAILED(hres)) { protocol_close_connection(protocol); @@ -344,6 +347,16 @@ HRESULT protocol_continue(Protocol *protocol, PROTOCOLDATA *data) protocol->flags &= ~FLAG_REQUEST_COMPLETE; res = InternetQueryDataAvailable(protocol->request, &protocol->available_bytes, 0, 0); if(res) { + if(!protocol->available_bytes) { + if(is_start) { + TRACE("empty file\n"); + all_data_read(protocol); + }else { + WARN("unexpected end of file?\n"); + report_result(protocol, INET_E_DOWNLOAD_FAILURE); + } + return S_OK; + } protocol->flags |= FLAG_REQUEST_COMPLETE; report_data(protocol); }else if(GetLastError() != ERROR_IO_PENDING) {
1
0
0
0
Alexandre Julliard : msi: Create temp files in the destination directory instead of the root.
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: 89472db9e3bc755427be98b7a7848c7480ec869d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=89472db9e3bc755427be98b7a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 9 15:56:57 2011 +0200 msi: Create temp files in the destination directory instead of the root. --- dlls/msi/files.c | 25 ++++++++++++++----------- dlls/msi/media.c | 28 ++++++++++++++++------------ 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/dlls/msi/files.c b/dlls/msi/files.c index af84e9b..94e5e6c 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -195,23 +195,25 @@ static UINT copy_install_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR source) } if (gle == ERROR_SHARING_VIOLATION || gle == ERROR_USER_MAPPED_FILE) { - WCHAR tmpfileW[MAX_PATH], *pathW, *p; + WCHAR *tmpfileW, *pathW, *p; DWORD len; TRACE("file in use, scheduling rename operation\n"); - GetTempFileNameW(szBackSlash, szMsi, 0, tmpfileW); - len = strlenW(file->TargetPath) + strlenW(tmpfileW) + 1; - if (!(pathW = msi_alloc(len * sizeof(WCHAR)))) - return ERROR_OUTOFMEMORY; - - strcpyW(pathW, file->TargetPath); + if (!(pathW = strdupW( file->TargetPath ))) return ERROR_OUTOFMEMORY; if ((p = strrchrW(pathW, '\\'))) *p = 0; - strcatW(pathW, tmpfileW); + len = strlenW( pathW ) + 16; + if (!(tmpfileW = msi_alloc(len * sizeof(WCHAR)))) + { + msi_free( pathW ); + return ERROR_OUTOFMEMORY; + } + if (!GetTempFileNameW( pathW, szMsi, 0, tmpfileW )) tmpfileW[0] = 0; + msi_free( pathW ); - if (CopyFileW(source, pathW, FALSE) && + if (CopyFileW(source, tmpfileW, FALSE) && MoveFileExW(file->TargetPath, NULL, MOVEFILE_DELAY_UNTIL_REBOOT) && - MoveFileExW(pathW, file->TargetPath, MOVEFILE_DELAY_UNTIL_REBOOT)) + MoveFileExW(tmpfileW, file->TargetPath, MOVEFILE_DELAY_UNTIL_REBOOT)) { file->state = msifs_installed; package->need_reboot = 1; @@ -221,8 +223,9 @@ static UINT copy_install_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR source) { gle = GetLastError(); WARN("failed to schedule rename operation: %d)\n", gle); + DeleteFileW( tmpfileW ); } - msi_free(pathW); + msi_free(tmpfileW); } return gle; diff --git a/dlls/msi/media.c b/dlls/msi/media.c index 9de2566..9f29ef7 100644 --- a/dlls/msi/media.c +++ b/dlls/msi/media.c @@ -458,32 +458,36 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint, } if (err == ERROR_SHARING_VIOLATION || err == ERROR_USER_MAPPED_FILE) { - WCHAR tmpfileW[MAX_PATH], *tmppathW, *p; + WCHAR *tmpfileW, *tmppathW, *p; DWORD len; TRACE("file in use, scheduling rename operation\n"); - GetTempFileNameW(szBackSlash, szMsi, 0, tmpfileW); - len = strlenW(path) + strlenW(tmpfileW) + 1; - if (!(tmppathW = msi_alloc(len * sizeof(WCHAR)))) - return ERROR_OUTOFMEMORY; - - strcpyW(tmppathW, path); + if (!(tmppathW = strdupW( path ))) return ERROR_OUTOFMEMORY; if ((p = strrchrW(tmppathW, '\\'))) *p = 0; - strcatW(tmppathW, tmpfileW); + len = strlenW( tmppathW ) + 16; + if (!(tmpfileW = msi_alloc(len * sizeof(WCHAR)))) + { + msi_free( tmppathW ); + return ERROR_OUTOFMEMORY; + } + if (!GetTempFileNameW(tmppathW, szMsi, 0, tmpfileW)) tmpfileW[0] = 0; + msi_free( tmppathW ); - handle = CreateFileW(tmppathW, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, attrs, NULL); + handle = CreateFileW(tmpfileW, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, attrs, NULL); if (handle != INVALID_HANDLE_VALUE && MoveFileExW(path, NULL, MOVEFILE_DELAY_UNTIL_REBOOT) && - MoveFileExW(tmppathW, path, MOVEFILE_DELAY_UNTIL_REBOOT)) + MoveFileExW(tmpfileW, path, MOVEFILE_DELAY_UNTIL_REBOOT)) { data->package->need_reboot = 1; } else + { WARN("failed to schedule rename operation %s (error %d)\n", debugstr_w(path), GetLastError()); - - msi_free(tmppathW); + DeleteFileW( tmpfileW ); + } + msi_free(tmpfileW); } else WARN("failed to create %s (error %d)\n", debugstr_w(path), err);
1
0
0
0
Michael Stefaniuc : ddraw: Use unsafe_impl_from_IDirect3DLight() for application provided ifaces.
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: 9059fee7c511cdd194349740018edc90b8b0cab1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9059fee7c511cdd1943497400…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Jun 9 11:57:45 2011 +0200 ddraw: Use unsafe_impl_from_IDirect3DLight() for application provided ifaces. --- dlls/ddraw/ddraw_private.h | 1 + dlls/ddraw/light.c | 9 +++++++++ dlls/ddraw/viewport.c | 23 +++++++++-------------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index c749168..f1e0219 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -408,6 +408,7 @@ struct IDirect3DLightImpl void light_activate(IDirect3DLightImpl *light) DECLSPEC_HIDDEN; void light_deactivate(IDirect3DLightImpl *light) DECLSPEC_HIDDEN; void d3d_light_init(IDirect3DLightImpl *light, IDirectDrawImpl *ddraw) DECLSPEC_HIDDEN; +IDirect3DLightImpl *unsafe_impl_from_IDirect3DLight(IDirect3DLight *iface) DECLSPEC_HIDDEN; /****************************************************************************** * IDirect3DMaterial implementation structure - Wraps to D3D7 diff --git a/dlls/ddraw/light.c b/dlls/ddraw/light.c index f7b8347..0325cd4 100644 --- a/dlls/ddraw/light.c +++ b/dlls/ddraw/light.c @@ -281,3 +281,12 @@ void d3d_light_init(IDirect3DLightImpl *light, IDirectDrawImpl *ddraw) light->ref = 1; light->ddraw = ddraw; } + +IDirect3DLightImpl *unsafe_impl_from_IDirect3DLight(IDirect3DLight *iface) +{ + if (!iface) + return NULL; + assert(iface->lpVtbl == &d3d_light_vtbl); + + return impl_from_IDirect3DLight(iface); +} diff --git a/dlls/ddraw/viewport.c b/dlls/ddraw/viewport.c index 08af7e2..7dc3dd4 100644 --- a/dlls/ddraw/viewport.c +++ b/dlls/ddraw/viewport.c @@ -715,12 +715,11 @@ static HRESULT WINAPI IDirect3DViewportImpl_Clear(IDirect3DViewport3 *iface, * DDERR_INVALIDPARAMS if there are 8 lights or more * *****************************************************************************/ -static HRESULT WINAPI -IDirect3DViewportImpl_AddLight(IDirect3DViewport3 *iface, - IDirect3DLight *lpDirect3DLight) +static HRESULT WINAPI IDirect3DViewportImpl_AddLight(IDirect3DViewport3 *iface, + IDirect3DLight *lpDirect3DLight) { IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface; - IDirect3DLightImpl *lpDirect3DLightImpl = (IDirect3DLightImpl *)lpDirect3DLight; + IDirect3DLightImpl *lpDirect3DLightImpl = unsafe_impl_from_IDirect3DLight(lpDirect3DLight); DWORD i = 0; DWORD map = This->map_lights; @@ -771,12 +770,11 @@ IDirect3DViewportImpl_AddLight(IDirect3DViewport3 *iface, * DDERR_INVALIDPARAMS if the light wasn't found * *****************************************************************************/ -static HRESULT WINAPI -IDirect3DViewportImpl_DeleteLight(IDirect3DViewport3 *iface, - IDirect3DLight *lpDirect3DLight) +static HRESULT WINAPI IDirect3DViewportImpl_DeleteLight(IDirect3DViewport3 *iface, + IDirect3DLight *lpDirect3DLight) { IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface; - IDirect3DLightImpl *l = (IDirect3DLightImpl *)lpDirect3DLight; + IDirect3DLightImpl *l = unsafe_impl_from_IDirect3DLight(lpDirect3DLight); TRACE("iface %p, light %p.\n", iface, lpDirect3DLight); @@ -814,14 +812,11 @@ IDirect3DViewportImpl_DeleteLight(IDirect3DViewport3 *iface, * D3D_OK, because it's a stub * *****************************************************************************/ -static HRESULT WINAPI -IDirect3DViewportImpl_NextLight(IDirect3DViewport3 *iface, - IDirect3DLight *lpDirect3DLight, - IDirect3DLight **lplpDirect3DLight, - DWORD dwFlags) +static HRESULT WINAPI IDirect3DViewportImpl_NextLight(IDirect3DViewport3 *iface, + IDirect3DLight *lpDirect3DLight, IDirect3DLight **lplpDirect3DLight, DWORD dwFlags) { IDirect3DViewportImpl *This = (IDirect3DViewportImpl *)iface; - IDirect3DLightImpl *l = (IDirect3DLightImpl *)lpDirect3DLight; + IDirect3DLightImpl *l = unsafe_impl_from_IDirect3DLight(lpDirect3DLight); struct list *entry; HRESULT hr;
1
0
0
0
Michael Stefaniuc : ddraw: COM cleanup for the IDirect3DLight iface.
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: 05194507080646a65642f78f6c141263b8919860 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=05194507080646a65642f78f6…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Jun 9 11:53:52 2011 +0200 ddraw: COM cleanup for the IDirect3DLight iface. --- dlls/ddraw/ddraw.c | 2 +- dlls/ddraw/ddraw_private.h | 2 +- dlls/ddraw/light.c | 52 +++++++++++-------------------------------- 3 files changed, 16 insertions(+), 40 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 3a8dba1..df74def 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -4550,7 +4550,7 @@ static HRESULT WINAPI d3d3_CreateLight(IDirect3D3 *iface, IDirect3DLight **light d3d_light_init(object, This); TRACE("Created light %p.\n", object); - *light = (IDirect3DLight *)object; + *light = &object->IDirect3DLight_iface; return D3D_OK; } diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index fd1017d..c749168 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -387,7 +387,7 @@ struct object_creation_info ******************************************************************************/ struct IDirect3DLightImpl { - const IDirect3DLightVtbl *lpVtbl; + IDirect3DLight IDirect3DLight_iface; LONG ref; /* IDirect3DLight fields */ diff --git a/dlls/ddraw/light.c b/dlls/ddraw/light.c index a6a3cad..f7b8347 100644 --- a/dlls/ddraw/light.c +++ b/dlls/ddraw/light.c @@ -91,9 +91,10 @@ void light_deactivate(IDirect3DLightImpl *light) } } -/***************************************************************************** - * IUnknown Methods. - *****************************************************************************/ +static inline IDirect3DLightImpl *impl_from_IDirect3DLight(IDirect3DLight *iface) +{ + return CONTAINING_RECORD(iface, IDirect3DLightImpl, IDirect3DLight_iface); +} /***************************************************************************** * IDirect3DLight::QueryInterface @@ -116,19 +117,9 @@ static HRESULT WINAPI IDirect3DLightImpl_QueryInterface(IDirect3DLight *iface, R return E_NOINTERFACE; } -/***************************************************************************** - * IDirect3DLight::AddRef - * - * Increases the refcount by 1 - * - * Returns: - * The new refcount - * - *****************************************************************************/ -static ULONG WINAPI -IDirect3DLightImpl_AddRef(IDirect3DLight *iface) +static ULONG WINAPI IDirect3DLightImpl_AddRef(IDirect3DLight *iface) { - IDirect3DLightImpl *This = (IDirect3DLightImpl *)iface; + IDirect3DLightImpl *This = impl_from_IDirect3DLight(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("%p increasing refcount to %u.\n", This, ref); @@ -136,20 +127,9 @@ IDirect3DLightImpl_AddRef(IDirect3DLight *iface) return ref; } -/***************************************************************************** - * IDirect3DLight::Release - * - * Reduces the refcount by one. If the refcount falls to 0, the object - * is destroyed - * - * Returns: - * The new refcount - * - *****************************************************************************/ -static ULONG WINAPI -IDirect3DLightImpl_Release(IDirect3DLight *iface) +static ULONG WINAPI IDirect3DLightImpl_Release(IDirect3DLight *iface) { - IDirect3DLightImpl *This = (IDirect3DLightImpl *)iface; + IDirect3DLightImpl *This = impl_from_IDirect3DLight(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("%p decreasing refcount to %u.\n", This, ref); @@ -207,12 +187,10 @@ static const float zero_value[] = { 0.0, 0.0, 0.0, 0.0 }; -static HRESULT WINAPI -IDirect3DLightImpl_SetLight(IDirect3DLight *iface, - D3DLIGHT *lpLight) +static HRESULT WINAPI IDirect3DLightImpl_SetLight(IDirect3DLight *iface, D3DLIGHT *lpLight) { - IDirect3DLightImpl *This = (IDirect3DLightImpl *)iface; - LPD3DLIGHT7 light7 = &(This->light7); + IDirect3DLightImpl *This = impl_from_IDirect3DLight(iface); + LPD3DLIGHT7 light7 = &This->light7; TRACE("iface %p, light %p.\n", iface, lpLight); @@ -266,11 +244,9 @@ IDirect3DLightImpl_SetLight(IDirect3DLight *iface, * D3D_OK on success * DDERR_INVALIDPARAMS if Light is NULL *****************************************************************************/ -static HRESULT WINAPI -IDirect3DLightImpl_GetLight(IDirect3DLight *iface, - D3DLIGHT *lpLight) +static HRESULT WINAPI IDirect3DLightImpl_GetLight(IDirect3DLight *iface, D3DLIGHT *lpLight) { - IDirect3DLightImpl *This = (IDirect3DLightImpl *)iface; + IDirect3DLightImpl *This = impl_from_IDirect3DLight(iface); TRACE("iface %p, light %p.\n", iface, lpLight); @@ -301,7 +277,7 @@ static const struct IDirect3DLightVtbl d3d_light_vtbl = void d3d_light_init(IDirect3DLightImpl *light, IDirectDrawImpl *ddraw) { - light->lpVtbl = &d3d_light_vtbl; + light->IDirect3DLight_iface.lpVtbl = &d3d_light_vtbl; light->ref = 1; light->ddraw = ddraw; }
1
0
0
0
Rico Schüller : d3dx9: Implement ID3DXBaseEffect:: GetBoolArray().
by Alexandre Julliard
09 Jun '11
09 Jun '11
Module: wine Branch: master Commit: 90154979a0d8573f6533f89816bf926e435fddf0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=90154979a0d8573f6533f8981…
Author: Rico Schüller <kgbricola(a)web.de> Date: Thu Jun 9 07:38:45 2011 +0200 d3dx9: Implement ID3DXBaseEffect::GetBoolArray(). --- dlls/d3dx9_36/effect.c | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index 137293c..bbe21f0 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -1614,10 +1614,29 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_SetBoolArray(ID3DXBaseEffect *iface, D static HRESULT WINAPI ID3DXBaseEffectImpl_GetBoolArray(ID3DXBaseEffect *iface, D3DXHANDLE parameter, BOOL *b, UINT count) { struct ID3DXBaseEffectImpl *This = impl_from_ID3DXBaseEffect(iface); + struct d3dx_parameter *param = is_valid_parameter(This, parameter); - FIXME("iface %p, parameter %p, b %p, count %u stub\n", This, parameter, b, count); + TRACE("iface %p, parameter %p, b %p, count %u\n", This, parameter, b, count); - return E_NOTIMPL; + if (!param) param = get_parameter_by_name(This, NULL, parameter); + + if (b && param && (param->class == D3DXPC_SCALAR + || param->class == D3DXPC_VECTOR + || param->class == D3DXPC_MATRIX_ROWS + || param->class == D3DXPC_MATRIX_COLUMNS)) + { + UINT i, size = min(count, param->bytes / sizeof(DWORD)); + + for (i = 0; i < size; ++i) + { + b[i] = get_bool((DWORD *)param->data + i); + } + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; } static HRESULT WINAPI ID3DXBaseEffectImpl_SetInt(ID3DXBaseEffect *iface, D3DXHANDLE parameter, INT n)
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
...
81
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
80
81
Results per page:
10
25
50
100
200