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
December 2021
----- 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
569 discussions
Start a n
N
ew thread
Jacek Caban : user32: Set %ecx to rect param when calling monitor enum proc.
by Alexandre Julliard
07 Dec '21
07 Dec '21
Module: wine Branch: master Commit: 66d2321a39f25d3ee9423c20432ce65b45cf1876 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=66d2321a39f25d3ee9423c20…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 7 15:28:29 2021 +0100 user32: Set %ecx to rect param when calling monitor enum proc. This was accidentally removed by 318673405c62. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/sysparams.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 498dbacbd37..bcc9c5cbf07 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -1158,7 +1158,6 @@ BOOL WINAPI GetMonitorInfoW( HMONITOR monitor, LPMONITORINFO info ) #ifdef __i386__ /* Some apps pass a non-stdcall callback to EnumDisplayMonitors, * so we need a small assembly wrapper to call it. - * MJ's Help Diagnostic expects that %ecx contains the address to the rect. */ extern BOOL enum_mon_callback_wrapper( void *proc, HMONITOR monitor, HDC hdc, RECT *rect, LPARAM lparam ); __ASM_GLOBAL_FUNC( enum_mon_callback_wrapper, @@ -1169,7 +1168,9 @@ __ASM_GLOBAL_FUNC( enum_mon_callback_wrapper, __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") "subl $8,%esp\n\t" "pushl 24(%ebp)\n\t" /* lparam */ - "pushl 20(%ebp)\n\t" /* rect */ + /* MJ's Help Diagnostic expects that %ecx contains the address to the rect. */ + "movl 20(%ebp),%ecx\n\t" /* rect */ + "pushl %ecx\n\t" "pushl 16(%ebp)\n\t" /* hdc */ "pushl 12(%ebp)\n\t" /* monitor */ "movl 8(%ebp),%eax\n" /* proc */
1
0
0
0
Jacek Caban : win32u: Fix return types on lock_display_devices failures.
by Alexandre Julliard
07 Dec '21
07 Dec '21
Module: wine Branch: master Commit: ed275327888b2223f1e63b211556e13f8bdcd612 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ed275327888b2223f1e63b21…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 7 15:28:15 2021 +0100 win32u: Fix return types on lock_display_devices failures. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/win32u/sysparams.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 56523210bdf..5c65dce716d 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -1528,14 +1528,16 @@ LONG WINAPI NtUserGetDisplayConfigBufferSizes( UINT32 flags, UINT32 *num_path_in if (flags != QDC_ONLY_ACTIVE_PATHS) FIXME( "only returning active paths\n" ); - if (!lock_display_devices()) return FALSE; - LIST_FOR_EACH_ENTRY( monitor, &monitors, struct monitor, entry ) + if (lock_display_devices()) { - if (!(monitor->dev.state_flags & DISPLAY_DEVICE_ACTIVE)) - continue; - count++; + LIST_FOR_EACH_ENTRY( monitor, &monitors, struct monitor, entry ) + { + if (!(monitor->dev.state_flags & DISPLAY_DEVICE_ACTIVE)) + continue; + count++; + } + unlock_display_devices(); } - unlock_display_devices(); *num_path_info = count; *num_mode_info = count * 2; @@ -1715,7 +1717,7 @@ LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devm return ret; } - if (!lock_display_devices()) return FALSE; + if (!lock_display_devices()) return DISP_CHANGE_FAILED; if ((adapter = find_adapter( devname ))) lstrcpyW( device_name, adapter->dev.device_name ); unlock_display_devices(); if (!adapter)
1
0
0
0
Alexandre Julliard : crypt32: Implement Wow64 entry points in the Unix library.
by Alexandre Julliard
07 Dec '21
07 Dec '21
Module: wine Branch: master Commit: b52c6bfbb138ea2e516c757710ad7272c40b74ec URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b52c6bfbb138ea2e516c7577…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 7 17:54:01 2021 +0100 crypt32: Implement Wow64 entry points in the Unix library. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/crypt32/crypt32_private.h | 10 ++-- dlls/crypt32/pfx.c | 4 +- dlls/crypt32/unixlib.c | 121 +++++++++++++++++++++++++++++++++++++++-- 3 files changed, 122 insertions(+), 13 deletions(-) diff --git a/dlls/crypt32/crypt32_private.h b/dlls/crypt32/crypt32_private.h index 7fed1665d56..f4131bf2694 100644 --- a/dlls/crypt32/crypt32_private.h +++ b/dlls/crypt32/crypt32_private.h @@ -461,25 +461,25 @@ void init_empty_store(void) DECLSPEC_HIDDEN; /* Unix interface */ -struct cert_store_data; +typedef UINT64 cert_store_data_t; struct open_cert_store_params { CRYPT_DATA_BLOB *pfx; const WCHAR *password; - struct cert_store_data **data_ret; + cert_store_data_t *data_ret; }; struct import_store_key_params { - struct cert_store_data *data; + cert_store_data_t data; void *buf; DWORD *buf_size; }; struct import_store_cert_params { - struct cert_store_data *data; + cert_store_data_t data; unsigned int index; void *buf; DWORD *buf_size; @@ -487,7 +487,7 @@ struct import_store_cert_params struct close_cert_store_params { - struct cert_store_data *data; + cert_store_data_t data; }; struct enum_root_certs_params diff --git a/dlls/crypt32/pfx.c b/dlls/crypt32/pfx.c index 1dd048c2b67..ca29c2aadfc 100644 --- a/dlls/crypt32/pfx.c +++ b/dlls/crypt32/pfx.c @@ -32,7 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt); -static HCRYPTPROV import_key( struct cert_store_data *data, DWORD flags ) +static HCRYPTPROV import_key( cert_store_data_t data, DWORD flags ) { HCRYPTPROV prov = 0; HCRYPTKEY cryptkey; @@ -145,7 +145,7 @@ HCERTSTORE WINAPI PFXImportCertStore( CRYPT_DATA_BLOB *pfx, const WCHAR *passwor DWORD i = 0, size; HCERTSTORE store = NULL; HCRYPTPROV prov = 0; - struct cert_store_data *data = NULL; + cert_store_data_t data = 0; struct open_cert_store_params open_params = { pfx, password, &data }; struct close_cert_store_params close_params; diff --git a/dlls/crypt32/unixlib.c b/dlls/crypt32/unixlib.c index 7cb521eb98b..a345b5e6ac8 100644 --- a/dlls/crypt32/unixlib.c +++ b/dlls/crypt32/unixlib.c @@ -161,10 +161,15 @@ struct cert_store_data unsigned int chain_len; }; +static struct cert_store_data *get_store_data( cert_store_data_t data ) +{ + return (struct cert_store_data *)(ULONG_PTR)data; +} + static NTSTATUS import_store_key( void *args ) { struct import_store_key_params *params = args; - struct cert_store_data *data = params->data; + struct cert_store_data *data = get_store_data( params->data ); int i, ret; unsigned int bitlen = data->key_bitlen; gnutls_datum_t m, e, d, p, q, u, e1, e2; @@ -303,7 +308,7 @@ static NTSTATUS open_cert_store( void *args ) store_data->chain = chain; store_data->key_bitlen = bitlen; store_data->chain_len = chain_len; - *params->data_ret = store_data; + *params->data_ret = (ULONG_PTR)store_data; return STATUS_SUCCESS; error: @@ -316,7 +321,7 @@ error: static NTSTATUS import_store_cert( void *args ) { struct import_store_cert_params *params = args; - struct cert_store_data *data = params->data; + struct cert_store_data *data = get_store_data( params->data ); size_t size = 0; int ret; @@ -339,11 +344,12 @@ static NTSTATUS import_store_cert( void *args ) static NTSTATUS close_cert_store( void *args ) { struct close_cert_store_params *params = args; + struct cert_store_data *data = get_store_data( params->data ); if (params->data) { - pgnutls_pkcs12_deinit( params->data->p12 ); - free( params->data ); + pgnutls_pkcs12_deinit( data->p12 ); + free( data ); } return STATUS_SUCCESS; } @@ -678,7 +684,7 @@ static NTSTATUS enum_root_certs( void *args ) return STATUS_SUCCESS; } -unixlib_entry_t __wine_unix_call_funcs[] = +const unixlib_entry_t __wine_unix_call_funcs[] = { process_attach, process_detach, @@ -688,3 +694,106 @@ unixlib_entry_t __wine_unix_call_funcs[] = close_cert_store, enum_root_certs, }; + +#ifdef _WIN64 + +typedef ULONG PTR32; + +typedef struct +{ + DWORD cbData; + PTR32 pbData; +} CRYPT_DATA_BLOB32; + +static NTSTATUS wow64_open_cert_store( void *args ) +{ + struct + { + PTR32 pfx; + PTR32 password; + PTR32 data_ret; + } const *params32 = args; + + const CRYPT_DATA_BLOB32 *pfx32 = ULongToPtr( params32->pfx ); + CRYPT_DATA_BLOB pfx = { pfx32->cbData, ULongToPtr( pfx32->pbData ) }; + struct open_cert_store_params params = + { + &pfx, + ULongToPtr( params32->password ), + ULongToPtr( params32->data_ret ) + }; + + return open_cert_store( ¶ms ); +} + +static NTSTATUS wow64_import_store_key( void *args ) +{ + struct + { + cert_store_data_t data; + PTR32 buf; + PTR32 buf_size; + } const *params32 = args; + + struct import_store_key_params params = + { + params32->data, + ULongToPtr( params32->buf ), + ULongToPtr( params32->buf_size ) + }; + + return import_store_key( ¶ms ); +} + +static NTSTATUS wow64_import_store_cert( void *args ) +{ + struct + { + cert_store_data_t data; + unsigned int index; + PTR32 buf; + PTR32 buf_size; + } const *params32 = args; + + struct import_store_cert_params params = + { + params32->data, + params32->index, + ULongToPtr( params32->buf ), + ULongToPtr( params32->buf_size ) + }; + + return import_store_cert( ¶ms ); +} + +static NTSTATUS wow64_enum_root_certs( void *args ) +{ + struct + { + PTR32 buffer; + DWORD size; + PTR32 needed; + } const *params32 = args; + + struct enum_root_certs_params params = + { + ULongToPtr( params32->buffer ), + params32->size, + ULongToPtr( params32->needed ) + }; + + return enum_root_certs( ¶ms ); +} + +const unixlib_entry_t __wine_unix_call_wow64_funcs[] = +{ + process_attach, + process_detach, + wow64_open_cert_store, + wow64_import_store_key, + wow64_import_store_cert, + close_cert_store, + wow64_enum_root_certs, +}; + +#endif /* _WIN64 */
1
0
0
0
Alexandre Julliard : ws2_32: Implement Wow64 entry points in the Unix library.
by Alexandre Julliard
07 Dec '21
07 Dec '21
Module: wine Branch: master Commit: d3de3c584a440fe9e8b48194d3e3cd807f2e59c5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d3de3c584a440fe9e8b48194…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 7 16:15:05 2021 +0100 ws2_32: Implement Wow64 entry points in the Unix library. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/unixlib.c | 280 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 280 insertions(+) diff --git a/dlls/ws2_32/unixlib.c b/dlls/ws2_32/unixlib.c index 5726fc31e3e..f1f43fbdb30 100644 --- a/dlls/ws2_32/unixlib.c +++ b/dlls/ws2_32/unixlib.c @@ -983,3 +983,283 @@ const unixlib_entry_t __wine_unix_call_funcs[] = unix_gethostname, unix_getnameinfo, }; + +#ifdef _WIN64 + +typedef ULONG PTR32; + +struct WS_addrinfo32 +{ + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + PTR32 ai_addrlen; + PTR32 ai_canonname; + PTR32 ai_addr; + PTR32 ai_next; +}; + +struct WS_hostent32 +{ + PTR32 h_name; + PTR32 h_aliases; + short h_addrtype; + short h_length; + PTR32 h_addr_list; +}; + +static NTSTATUS put_addrinfo32( const struct WS_addrinfo *info, struct WS_addrinfo32 *info32, + unsigned int *size ) +{ + struct WS_addrinfo32 *dst = info32, *prev = NULL; + const struct WS_addrinfo *src; + unsigned int needed_size = 0; + + for (src = info; src != NULL; src = src->ai_next) + { + needed_size += sizeof(struct WS_addrinfo32); + if (src->ai_canonname) needed_size += strlen( src->ai_canonname ) + 1; + needed_size += src->ai_addrlen; + } + + if (*size < needed_size) + { + *size = needed_size; + return ERROR_INSUFFICIENT_BUFFER; + } + + memset( info32, 0, needed_size ); + + for (src = info; src != NULL; src = src->ai_next) + { + char *next = (char *)(dst + 1); + + dst->ai_flags = src->ai_flags; + dst->ai_family = src->ai_family; + dst->ai_socktype = src->ai_socktype; + dst->ai_protocol = src->ai_protocol; + if (src->ai_canonname) + { + dst->ai_canonname = PtrToUlong( next ); + strcpy( next, src->ai_canonname ); + next += strlen(next) + 1; + } + dst->ai_addrlen = src->ai_addrlen; + dst->ai_addr = PtrToUlong(next); + memcpy( next, src->ai_addr, dst->ai_addrlen ); + next += dst->ai_addrlen; + if (prev) prev->ai_next = PtrToUlong(dst); + prev = dst; + dst = (struct WS_addrinfo32 *)next; + } + return STATUS_SUCCESS; +} + +static NTSTATUS put_hostent32( const struct WS_hostent *host, struct WS_hostent32 *host32, + unsigned int *size ) +{ + unsigned int needed_size = sizeof( struct WS_hostent32 ), alias_count = 0, addr_count = 0, i; + char *p; + ULONG *aliases, *addr_list; + + needed_size += strlen( host->h_name ) + 1; + + for (alias_count = 0; host->h_aliases[alias_count] != NULL; ++alias_count) + needed_size += sizeof(ULONG) + strlen( host->h_aliases[alias_count] ) + 1; + needed_size += sizeof(ULONG); /* null terminator */ + + for (addr_count = 0; host->h_addr_list[addr_count] != NULL; ++addr_count) + needed_size += sizeof(ULONG) + host->h_length; + needed_size += sizeof(ULONG); /* null terminator */ + + if (*size < needed_size) + { + *size = needed_size; + return ERROR_INSUFFICIENT_BUFFER; + } + + memset( host32, 0, needed_size ); + + /* arrange the memory in the same order as windows >= XP */ + + host32->h_addrtype = host->h_addrtype; + host32->h_length = host->h_length; + + aliases = (ULONG *)(host32 + 1); + addr_list = aliases + alias_count + 1; + p = (char *)(addr_list + addr_count + 1); + + host32->h_aliases = PtrToUlong( aliases ); + host32->h_addr_list = PtrToUlong( addr_list ); + + for (i = 0; i < addr_count; ++i) + { + addr_list[i] = PtrToUlong( p ); + memcpy( p, host->h_addr_list[i], host->h_length ); + p += host->h_length; + } + + for (i = 0; i < alias_count; ++i) + { + size_t len = strlen( host->h_aliases[i] ) + 1; + + aliases[i] = PtrToUlong( p ); + memcpy( p, host->h_aliases[i], len ); + p += len; + } + + host32->h_name = PtrToUlong( p ); + strcpy( p, host->h_name ); + return STATUS_SUCCESS; +} + + +static NTSTATUS wow64_unix_getaddrinfo( void *args ) +{ + struct + { + PTR32 node; + PTR32 service; + PTR32 hints; + PTR32 info; + PTR32 size; + } const *params32 = args; + + NTSTATUS status; + struct WS_addrinfo hints; + struct getaddrinfo_params params = + { + ULongToPtr( params32->node ), + ULongToPtr( params32->service ), + NULL, + NULL, + ULongToPtr(params32->size) + }; + + if (params32->hints) + { + const struct WS_addrinfo32 *hints32 = ULongToPtr(params32->hints); + hints.ai_flags = hints32->ai_flags; + hints.ai_family = hints32->ai_family; + hints.ai_socktype = hints32->ai_socktype; + hints.ai_protocol = hints32->ai_protocol; + params.hints = &hints; + } + + if (!(params.info = malloc( *params.size ))) return WSAENOBUFS; + status = unix_getaddrinfo( ¶ms ); + if (!status) put_addrinfo32( params.info, ULongToPtr(params32->info), ULongToPtr(params32->size) ); + free( params.info ); + return status; +} + + +static NTSTATUS wow64_unix_gethostbyaddr( void *args ) +{ + struct + { + PTR32 addr; + int len; + int family; + PTR32 host; + PTR32 size; + } const *params32 = args; + + NTSTATUS status; + struct gethostbyaddr_params params = + { + ULongToPtr( params32->addr ), + params32->len, + params32->family, + NULL, + ULongToPtr(params32->size) + }; + + if (!(params.host = malloc( *params.size ))) return WSAENOBUFS; + status = unix_gethostbyaddr( ¶ms ); + if (!status) + status = put_hostent32( params.host, ULongToPtr(params32->host), ULongToPtr(params32->size) ); + free( params.host ); + return status; +} + + +static NTSTATUS wow64_unix_gethostbyname( void *args ) +{ + struct + { + PTR32 name; + PTR32 host; + PTR32 size; + } const *params32 = args; + + NTSTATUS status; + struct gethostbyname_params params = + { + ULongToPtr( params32->name ), + NULL, + ULongToPtr(params32->size) + }; + + if (!(params.host = malloc( *params.size ))) return WSAENOBUFS; + status = unix_gethostbyname( ¶ms ); + if (!status) + status = put_hostent32( params.host, ULongToPtr(params32->host), ULongToPtr(params32->size) ); + free( params.host ); + return status; +} + + +static NTSTATUS wow64_unix_gethostname( void *args ) +{ + struct + { + PTR32 name; + unsigned int size; + } const *params32 = args; + + struct gethostname_params params = { ULongToPtr(params32->name), params32->size }; + + if (!unix_gethostname( ¶ms )) return 0; + return errno_from_unix( errno ); +} + + +static NTSTATUS wow64_unix_getnameinfo( void *args ) +{ + struct + { + PTR32 addr; + int addr_len; + PTR32 host; + DWORD host_len; + PTR32 serv; + DWORD serv_len; + unsigned int flags; + } const *params32 = args; + + struct getnameinfo_params params = + { + ULongToPtr( params32->addr ), + params32->addr_len, + ULongToPtr( params32->host ), + params32->host_len, + ULongToPtr( params32->serv ), + params32->serv_len, + params32->flags + }; + + return unix_getnameinfo( ¶ms ); +} + +const unixlib_entry_t __wine_unix_call_wow64_funcs[] = +{ + wow64_unix_getaddrinfo, + wow64_unix_gethostbyaddr, + wow64_unix_gethostbyname, + wow64_unix_gethostname, + wow64_unix_getnameinfo, +}; + +#endif /* _WIN64 */
1
0
0
0
Alexandre Julliard : ws2_32: Fix a potential buffer overflow in the Unix interface.
by Alexandre Julliard
07 Dec '21
07 Dec '21
Module: wine Branch: master Commit: 74045dc812eea94a15d89871d8b3f3038fc30e48 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=74045dc812eea94a15d89871…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 7 16:14:12 2021 +0100 ws2_32: Fix a potential buffer overflow in the Unix interface. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/unixlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ws2_32/unixlib.c b/dlls/ws2_32/unixlib.c index 67edf06368e..5726fc31e3e 100644 --- a/dlls/ws2_32/unixlib.c +++ b/dlls/ws2_32/unixlib.c @@ -783,7 +783,7 @@ static int hostent_from_unix( const struct hostent *unix_host, struct WS_hostent unsigned int needed_size = sizeof( struct WS_hostent ), alias_count = 0, addr_count = 0, i; char *p; - needed_size += strlen( unix_host->h_name ); + needed_size += strlen( unix_host->h_name ) + 1; for (alias_count = 0; unix_host->h_aliases[alias_count] != NULL; ++alias_count) needed_size += sizeof(char *) + strlen( unix_host->h_aliases[alias_count] ) + 1;
1
0
0
0
Alexandre Julliard : wineandroid: Use full pathnames to invoke builtin apps.
by Alexandre Julliard
07 Dec '21
07 Dec '21
Module: wine Branch: master Commit: 7b00a50943bf9716cb459d58a737048b1971459e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7b00a50943bf9716cb459d58…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 7 12:25:20 2021 +0100 wineandroid: Use full pathnames to invoke builtin apps. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wineandroid.drv/WineActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wineandroid.drv/WineActivity.java b/dlls/wineandroid.drv/WineActivity.java index f9f39dc6c7b..a47a4f89290 100644 --- a/dlls/wineandroid.drv/WineActivity.java +++ b/dlls/wineandroid.drv/WineActivity.java @@ -131,7 +131,7 @@ public class WineActivity extends Activity if (cmdline == null) { if (new File( prefix, "drive_c/winestart.cmd" ).exists()) cmdline = "c:\\winestart.cmd"; - else cmdline = "wineconsole.exe"; + else cmdline = "c:\\windows\\system32\\wineconsole.exe"; } String winedebug = readFileString( new File( prefix, "winedebug" )); @@ -164,7 +164,7 @@ public class WineActivity extends Activity } String[] cmd = { environ.get( "WINELOADER" ), - "explorer.exe", + "c:\\windows\\system32\\explorer.exe", "/desktop=shell,,android", cmdline };
1
0
0
0
Alexandre Julliard : ntdll: Don't return a default Unix handle for modules that don't have a Unix library.
by Alexandre Julliard
07 Dec '21
07 Dec '21
Module: wine Branch: master Commit: 456e76185d0ba5895fd2b498ec5534cc9f27f935 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=456e76185d0ba5895fd2b498…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 7 15:10:41 2021 +0100 ntdll: Don't return a default Unix handle for modules that don't have a Unix library. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/virtual.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index 5873a3e2335..259968a890c 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -655,8 +655,11 @@ static NTSTATUS get_builtin_unix_funcs( void *module, BOOL wow, void **funcs ) LIST_FOR_EACH_ENTRY( builtin, &builtin_modules, struct builtin_module, entry ) { if (builtin->module != module) continue; - *funcs = dlsym( builtin->unix_handle, ptr_name ); - status = *funcs ? STATUS_SUCCESS : STATUS_ENTRYPOINT_NOT_FOUND; + if (builtin->unix_handle) + { + *funcs = dlsym( builtin->unix_handle, ptr_name ); + status = *funcs ? STATUS_SUCCESS : STATUS_ENTRYPOINT_NOT_FOUND; + } break; } server_leave_uninterrupted_section( &virtual_mutex, &sigset );
1
0
0
0
Nikolay Sivov : dwrite: Remove unixlib callbacks.
by Alexandre Julliard
07 Dec '21
07 Dec '21
Module: wine Branch: master Commit: 06742814ed08c65c6466f459bfd46d8fdfd0eb13 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=06742814ed08c65c6466f459…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Dec 7 15:59:47 2021 +0300 dwrite: Remove unixlib callbacks. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/dwrite_private.h | 8 ---- dlls/dwrite/font.c | 74 +---------------------------------- dlls/dwrite/freetype.c | 93 +------------------------------------------- 3 files changed, 3 insertions(+), 172 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 1ac50747ec6..f83372acc9e 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -717,18 +717,10 @@ extern HRESULT shape_check_typographic_feature(struct scriptshaping_context *con struct font_data_context; extern HMODULE dwrite_module DECLSPEC_HIDDEN; -struct font_callback_funcs -{ - int (CDECL *get_font_data)(void *key, const void **data_ptr, UINT64 *data_size, unsigned int *index, - struct font_data_context **context); - void (CDECL *release_font_data)(struct font_data_context *context); -}; - struct font_backend_funcs { font_object_handle (CDECL *create_font_object)(const void *data_ptr, UINT64 data_size, unsigned int index); void (CDECL *release_font_object)(font_object_handle object); - void (CDECL *notify_release)(void *key); int (CDECL *get_glyph_outline)(font_object_handle object, float emsize, unsigned int simulations, UINT16 glyph, struct dwrite_outline *outline); UINT16 (CDECL *get_glyph_count)(font_object_handle object); diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 05aea75d52d..cb4f856524c 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -837,7 +837,6 @@ static ULONG WINAPI dwritefontface_Release(IDWriteFontFace5 *iface) for (i = 0; i < ARRAY_SIZE(fontface->glyphs); i++) free(fontface->glyphs[i]); - font_funcs->notify_release(iface); font_funcs->release_font_object(fontface->font_object); if (fontface->stream) { @@ -8142,81 +8141,12 @@ HRESULT create_fontset_builder(IDWriteFactory7 *factory, IDWriteFontSetBuilder2 return S_OK; } -struct font_data_context -{ - IDWriteFontFileStream *stream; - void *context; -}; - -static int CDECL get_font_data_cb(void *key, const void **data_ptr, UINT64 *data_size, - unsigned int *index, struct font_data_context **ret_context) -{ - IDWriteFontFace *fontface = key; - struct font_data_context *context; - IDWriteFontFileStream *stream; - IDWriteFontFile *file; - unsigned int count; - void *data_context; - HRESULT hr; - - *ret_context = NULL; - - count = 1; - if (FAILED(IDWriteFontFace_GetFiles(fontface, &count, &file))) return 1; - - hr = get_filestream_from_file(file, &stream); - IDWriteFontFile_Release(file); - if (FAILED(hr)) return 1; - - hr = IDWriteFontFileStream_GetFileSize(stream, data_size); - if (FAILED(hr)) - { - IDWriteFontFileStream_Release(stream); - return 1; - } - - hr = IDWriteFontFileStream_ReadFileFragment(stream, data_ptr, 0, *data_size, &data_context); - if (FAILED(hr)) - { - IDWriteFontFileStream_Release(stream); - return 1; - } - - if (!(context = malloc(sizeof(*context)))) - { - IDWriteFontFileStream_Release(stream); - return 1; - } - - context->stream = stream; - context->context = data_context; - - *ret_context = context; - *index = IDWriteFontFace_GetIndex(fontface); - - return 0; -} - -static void CDECL release_font_data_cb(struct font_data_context *context) -{ - if (!context) return; - IDWriteFontFileStream_ReleaseFileFragment(context->stream, context->context); - IDWriteFontFileStream_Release(context->stream); - free(context); -} - -struct font_callback_funcs callback_funcs = -{ - get_font_data_cb, - release_font_data_cb, -}; - void init_font_backend(void) { - __wine_init_unix_lib(dwrite_module, DLL_PROCESS_ATTACH, &callback_funcs, &font_funcs); + __wine_init_unix_lib(dwrite_module, DLL_PROCESS_ATTACH, NULL, &font_funcs); } void release_font_backend(void) { - __wine_init_unix_lib(dwrite_module, DLL_PROCESS_DETACH, &callback_funcs, NULL); + __wine_init_unix_lib(dwrite_module, DLL_PROCESS_DETACH, NULL, NULL); } diff --git a/dlls/dwrite/freetype.c b/dlls/dwrite/freetype.c index 3b9676a1af1..daaff6a3f8c 100644 --- a/dlls/dwrite/freetype.c +++ b/dlls/dwrite/freetype.c @@ -29,7 +29,7 @@ #ifdef HAVE_FT2BUILD_H #include <ft2build.h> -#include FT_CACHE_H +#include FT_GLYPH_H #include FT_FREETYPE_H #include FT_OUTLINE_H #include FT_TRUETYPE_TABLES_H @@ -47,19 +47,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(dwrite); -static RTL_CRITICAL_SECTION freetype_cs; -static RTL_CRITICAL_SECTION_DEBUG critsect_debug = -{ - 0, 0, &freetype_cs, - { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, - 0, 0, { (DWORD_PTR)(__FILE__ ": freetype_cs") } -}; -static RTL_CRITICAL_SECTION freetype_cs = { &critsect_debug, -1, 0, 0, 0, 0 }; - static void *ft_handle = NULL; static FT_Library library = 0; -static FTC_Manager cache_manager = 0; -static FTC_ImageCache image_cache = 0; typedef struct { FT_Int major; @@ -67,8 +56,6 @@ typedef struct FT_Int patch; } FT_Version_t; -static const struct font_callback_funcs *callback_funcs; - #define MAKE_FUNCPTR(f) static typeof(f) * p##f = NULL MAKE_FUNCPTR(FT_Activate_Size); MAKE_FUNCPTR(FT_Done_Face); @@ -98,53 +85,9 @@ MAKE_FUNCPTR(FT_Outline_New); MAKE_FUNCPTR(FT_Outline_Transform); MAKE_FUNCPTR(FT_Outline_Translate); MAKE_FUNCPTR(FT_Set_Pixel_Sizes); -MAKE_FUNCPTR(FTC_ImageCache_Lookup); -MAKE_FUNCPTR(FTC_ImageCache_New); -MAKE_FUNCPTR(FTC_Manager_New); -MAKE_FUNCPTR(FTC_Manager_Done); -MAKE_FUNCPTR(FTC_Manager_LookupFace); -MAKE_FUNCPTR(FTC_Manager_LookupSize); -MAKE_FUNCPTR(FTC_Manager_RemoveFaceID); #undef MAKE_FUNCPTR static FT_Error (*pFT_Outline_EmboldenXY)(FT_Outline *, FT_Pos, FT_Pos); -static void face_finalizer(void *object) -{ - FT_Face face = object; - callback_funcs->release_font_data((struct font_data_context *)face->generic.data); -} - -static FT_Error face_requester(FTC_FaceID face_id, FT_Library library, FT_Pointer request_data, FT_Face *face) -{ - struct font_data_context *context; - const void *data_ptr; - FT_Error fterror; - UINT64 data_size; - UINT32 index; - - *face = NULL; - - if (!face_id) - { - WARN("NULL fontface requested.\n"); - return FT_Err_Ok; - } - - if (callback_funcs->get_font_data(face_id, &data_ptr, &data_size, &index, &context)) - return FT_Err_Ok; - - fterror = pFT_New_Memory_Face(library, data_ptr, data_size, index, face); - if (fterror == FT_Err_Ok) - { - (*face)->generic.data = context; - (*face)->generic.finalizer = face_finalizer; - } - else - callback_funcs->release_font_data(context); - - return fterror; -} - static FT_Size freetype_set_face_size(FT_Face face, FT_UInt emsize) { FT_Size size; @@ -207,13 +150,6 @@ static BOOL init_freetype(void) LOAD_FUNCPTR(FT_Outline_Transform) LOAD_FUNCPTR(FT_Outline_Translate) LOAD_FUNCPTR(FT_Set_Pixel_Sizes) - LOAD_FUNCPTR(FTC_ImageCache_Lookup) - LOAD_FUNCPTR(FTC_ImageCache_New) - LOAD_FUNCPTR(FTC_Manager_New) - LOAD_FUNCPTR(FTC_Manager_Done) - LOAD_FUNCPTR(FTC_Manager_LookupFace) - LOAD_FUNCPTR(FTC_Manager_LookupSize) - LOAD_FUNCPTR(FTC_Manager_RemoveFaceID) #undef LOAD_FUNCPTR pFT_Outline_EmboldenXY = dlsym(ft_handle, "FT_Outline_EmboldenXY"); @@ -225,18 +161,6 @@ static BOOL init_freetype(void) } pFT_Library_Version(library, &FT_Version.major, &FT_Version.minor, &FT_Version.patch); - /* init cache manager */ - if (pFTC_Manager_New(library, 0, 0, 0, &face_requester, NULL, &cache_manager) != 0 || - pFTC_ImageCache_New(cache_manager, &image_cache) != 0) { - - ERR("Failed to init FreeType cache\n"); - pFTC_Manager_Done(cache_manager); - pFT_Done_FreeType(library); - dlclose(ft_handle); - ft_handle = NULL; - return FALSE; - } - TRACE("FreeType version is %d.%d.%d\n", FT_Version.major, FT_Version.minor, FT_Version.patch); return TRUE; @@ -264,13 +188,6 @@ static void CDECL freetype_release_font_object(font_object_handle object) pFT_Done_Face(object); } -static void CDECL freetype_notify_release(void *key) -{ - RtlEnterCriticalSection(&freetype_cs); - pFTC_Manager_RemoveFaceID(cache_manager, key); - RtlLeaveCriticalSection(&freetype_cs); -} - static void CDECL freetype_get_design_glyph_metrics(font_object_handle object, UINT16 upem, UINT16 ascent, unsigned int simulations, UINT16 glyph, DWRITE_GLYPH_METRICS *ret) { @@ -793,7 +710,6 @@ const static struct font_backend_funcs freetype_funcs = { freetype_create_font_object, freetype_release_font_object, - freetype_notify_release, freetype_get_glyph_outline, freetype_get_glyph_count, freetype_get_glyph_advance, @@ -804,7 +720,6 @@ const static struct font_backend_funcs freetype_funcs = static NTSTATUS init_freetype_lib(HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out) { - callback_funcs = ptr_in; if (!init_freetype()) return STATUS_DLL_NOT_FOUND; *(const struct font_backend_funcs **)ptr_out = &freetype_funcs; return STATUS_SUCCESS; @@ -812,7 +727,6 @@ static NTSTATUS init_freetype_lib(HMODULE module, DWORD reason, const void *ptr_ static NTSTATUS release_freetype_lib(void) { - pFTC_Manager_Done(cache_manager); pFT_Done_FreeType(library); return STATUS_SUCCESS; } @@ -828,10 +742,6 @@ static void CDECL null_release_font_object(font_object_handle object) { } -static void CDECL null_notify_release(void *key) -{ -} - static int CDECL null_get_glyph_outline(font_object_handle object, float emSize, unsigned int simulations, UINT16 glyph, struct dwrite_outline *outline) { @@ -869,7 +779,6 @@ const static struct font_backend_funcs null_funcs = { null_create_font_object, null_release_font_object, - null_notify_release, null_get_glyph_outline, null_get_glyph_count, null_get_glyph_advance,
1
0
0
0
Nikolay Sivov : dwrite: Move bitmap cache to PE side.
by Alexandre Julliard
07 Dec '21
07 Dec '21
Module: wine Branch: master Commit: b1dc908aa59f43e34b91c12fd13dd84f741db47a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b1dc908aa59f43e34b91c12f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Dec 7 15:59:46 2021 +0300 dwrite: Move bitmap cache to PE side. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/dwrite_private.h | 2 +- dlls/dwrite/font.c | 103 +++++++++++++++++++++++++++++-------------- dlls/dwrite/freetype.c | 53 ++++++++-------------- 3 files changed, 90 insertions(+), 68 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=b1dc908aa59f43e34b91…
1
0
0
0
Nikolay Sivov : dwrite: Move glyph box cache to PE side.
by Alexandre Julliard
07 Dec '21
07 Dec '21
Module: wine Branch: master Commit: b3ad9000c04c5e57d65d955c1669402fb617c79d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b3ad9000c04c5e57d65d955c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Dec 7 15:59:45 2021 +0300 dwrite: Move glyph box cache to PE side. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/dwrite_private.h | 2 +- dlls/dwrite/font.c | 96 ++++++++++++++++++++++++++------------------ dlls/dwrite/freetype.c | 58 +++++++++++++------------- 3 files changed, 88 insertions(+), 68 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=b3ad9000c04c5e57d65d…
1
0
0
0
← Newer
1
...
34
35
36
37
38
39
40
...
57
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
Results per page:
10
25
50
100
200