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
July
June
May
April
March
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
September 2023
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
1 participants
920 discussions
Start a n
N
ew thread
Alexandre Julliard : kernel32/tests: Comment out one more test that can crash on Windows.
by Alexandre Julliard
20 Sep '23
20 Sep '23
Module: wine Branch: master Commit: 74559aaa7f44dd5e281df5add62d1f6bcfc074fe URL:
https://gitlab.winehq.org/wine/wine/-/commit/74559aaa7f44dd5e281df5add62d1f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Sep 20 13:49:10 2023 +0200 kernel32/tests: Comment out one more test that can crash on Windows. --- dlls/kernel32/tests/heap.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c index 24ce6b792da..d05eac33174 100644 --- a/dlls/kernel32/tests/heap.c +++ b/dlls/kernel32/tests/heap.c @@ -264,6 +264,9 @@ static void test_HeapCreate(void) ptr1 = HeapReAlloc( heap, 0, (void *)0xdeadbe00, 1 ); ok( !ptr1, "HeapReAlloc succeeded\n" ); ok( GetLastError() == ERROR_NOACCESS, "got error %lu\n", GetLastError() ); + ret = HeapValidate( heap, 0, (void *)0xdeadbe00 ); + ok( !ret, "HeapValidate succeeded\n" ); + ok( GetLastError() == ERROR_NOACCESS, "got error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); ptr = (BYTE *)((UINT_PTR)buffer & ~63) + 64; ptr1 = HeapReAlloc( heap, 0, ptr, 1 ); @@ -275,12 +278,6 @@ static void test_HeapCreate(void) ret = HeapValidate( heap, 0, NULL ); ok( ret, "HeapValidate failed, error %lu\n", GetLastError() ); ok( GetLastError() == 0xdeadbeef, "got error %lu\n", GetLastError() ); - SetLastError( 0xdeadbeef ); - ret = HeapValidate( heap, 0, (void *)0xdeadbe00 ); - ok( !ret, "HeapValidate succeeded\n" ); - todo_wine - ok( GetLastError() == ERROR_NOACCESS, "got error %lu\n", GetLastError() ); - SetLastError( 0xdeadbeef ); ptr = (BYTE *)((UINT_PTR)buffer & ~63) + 64; ret = HeapValidate( heap, 0, ptr ); ok( !ret, "HeapValidate succeeded\n" );
1
0
0
0
Alexandre Julliard : ntdll: Remove unneeded SEH annotations in Unix code.
by Alexandre Julliard
20 Sep '23
20 Sep '23
Module: wine Branch: master Commit: a5fe0bc70fbfccc9dc4d6abbca169326383a9c54 URL:
https://gitlab.winehq.org/wine/wine/-/commit/a5fe0bc70fbfccc9dc4d6abbca1693…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Sep 20 11:22:50 2023 +0200 ntdll: Remove unneeded SEH annotations in Unix code. --- dlls/ntdll/unix/signal_x86_64.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index 48b5b4d5de9..79d69d11547 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -2522,8 +2522,6 @@ void DECLSPEC_HIDDEN call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, B */ __ASM_GLOBAL_FUNC( signal_start_thread, "subq $56,%rsp\n\t" - __ASM_SEH(".seh_stackalloc 56\n\t") - __ASM_SEH(".seh_endprologue\n\t") __ASM_CFI(".cfi_adjust_cfa_offset 56\n\t") "movq %rbp,48(%rsp)\n\t" __ASM_CFI(".cfi_rel_offset %rbp,48\n\t")
1
0
0
0
Alexandre Julliard : vcomp: Add SEH annotations to ARM64 assembly code.
by Alexandre Julliard
20 Sep '23
20 Sep '23
Module: wine Branch: master Commit: a947eff6a47fdac9d2e76510f0d760f9955e212e URL:
https://gitlab.winehq.org/wine/wine/-/commit/a947eff6a47fdac9d2e76510f0d760…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Sep 20 11:18:29 2023 +0200 vcomp: Add SEH annotations to ARM64 assembly code. --- dlls/vcomp/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c index 374adf3991a..63ec0502b9b 100644 --- a/dlls/vcomp/main.c +++ b/dlls/vcomp/main.c @@ -253,7 +253,10 @@ __ASM_GLOBAL_FUNC( _vcomp_fork_call_wrapper, extern void CDECL _vcomp_fork_call_wrapper(void *wrapper, int nargs, void **args); __ASM_GLOBAL_FUNC( _vcomp_fork_call_wrapper, "stp x29, x30, [SP,#-16]!\n\t" + __ASM_SEH(".seh_save_fplr_x 16\n\t") "mov x29, SP\n\t" + __ASM_SEH(".seh_set_fp\n\t") + __ASM_SEH(".seh_endprologue\n\t") "mov x9, x0\n\t" "cbz w1, 4f\n\t" "lsl w8, w1, #3\n\t"
1
0
0
0
Alexandre Julliard : rpcrt4: Add SEH annotations to ARM64 assembly code.
by Alexandre Julliard
20 Sep '23
20 Sep '23
Module: wine Branch: master Commit: 3acb058a558ee687ca9c67175bf1490bddf34016 URL:
https://gitlab.winehq.org/wine/wine/-/commit/3acb058a558ee687ca9c67175bf149…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Sep 20 11:18:10 2023 +0200 rpcrt4: Add SEH annotations to ARM64 assembly code. --- dlls/rpcrt4/cproxy.c | 3 +++ dlls/rpcrt4/ndr_stubless.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c index 80400422e41..ea0d65db259 100644 --- a/dlls/rpcrt4/cproxy.c +++ b/dlls/rpcrt4/cproxy.c @@ -201,7 +201,10 @@ static inline void init_thunk( struct thunk *thunk, unsigned int index ) extern void call_stubless_func(void); __ASM_GLOBAL_FUNC( call_stubless_func, "stp x29, x30, [sp, #-0x90]!\n\t" + __ASM_SEH(".seh_save_fplr_x 0x90\n\t") "mov x29, sp\n\t" + __ASM_SEH(".seh_set_fp\n\t") + __ASM_SEH(".seh_endprologue\n\t") "stp d0, d1, [sp, #0x10]\n\t" "stp d2, d3, [sp, #0x20]\n\t" "stp d4, d5, [sp, #0x30]\n\t" diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index 8fc5fd41ca6..2e84d64bba5 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -1181,7 +1181,10 @@ __ASM_GLOBAL_FUNC( call_server_func, LONG_PTR __cdecl call_server_func(SERVER_ROUTINE func, unsigned char *args, unsigned int stack_size); __ASM_GLOBAL_FUNC( call_server_func, "stp x29, x30, [sp, #-16]!\n\t" + __ASM_SEH(".seh_save_fplr_x 16\n\t") "mov x29, sp\n\t" + __ASM_SEH(".seh_set_fp\n\t") + __ASM_SEH(".seh_endprologue\n\t") "add x9, x2, #15\n\t" "lsr x9, x9, #4\n\t" "sub sp, sp, x9, lsl #4\n\t"
1
0
0
0
Alexandre Julliard : oleaut32: Add SEH annotations to ARM64 assembly code.
by Alexandre Julliard
20 Sep '23
20 Sep '23
Module: wine Branch: master Commit: bb611b9db795129c32db1bb46c238cc213e52ff6 URL:
https://gitlab.winehq.org/wine/wine/-/commit/bb611b9db795129c32db1bb46c238c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Sep 20 11:17:40 2023 +0200 oleaut32: Add SEH annotations to ARM64 assembly code. --- dlls/oleaut32/typelib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 5e9093f61a4..fa512184182 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -6822,7 +6822,10 @@ extern float CDECL call_float_method( void *func, int nb_stk_args, const DWORD_P extern double CDECL call_double_method( void *func, int nb_stk_args, const DWORD_PTR *stk_args, const DWORD_PTR *reg_args ); __ASM_GLOBAL_FUNC( call_method, "stp x29, x30, [sp, #-16]!\n\t" + __ASM_SEH(".seh_save_fplr_x 16\n\t") "mov x29, sp\n\t" + __ASM_SEH(".seh_set_fp\n\t") + __ASM_SEH(".seh_endprologue\n\t") "sub sp, sp, x1, lsl #3\n\t" "cbz x1, 2f\n" "1:\tsub x1, x1, #1\n\t"
1
0
0
0
Hans Leidekker : winmm/tests: Avoid truncating the handle passed to waveInGetDevCapsW().
by Alexandre Julliard
20 Sep '23
20 Sep '23
Module: wine Branch: master Commit: 37c19e7a877e942f446a156ecb515797c782b7b9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/37c19e7a877e942f446a156ecb5157…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Sep 19 16:56:17 2023 +0200 winmm/tests: Avoid truncating the handle passed to waveInGetDevCapsW(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55240
--- dlls/winmm/tests/capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winmm/tests/capture.c b/dlls/winmm/tests/capture.c index a3d15e418ec..f95ea0c17e6 100644 --- a/dlls/winmm/tests/capture.c +++ b/dlls/winmm/tests/capture.c @@ -176,7 +176,7 @@ static void wave_in_test_deviceIn(int device, WAVEFORMATEX *pwfx, DWORD format, pwfx->nChannels, nSamplesPerSec, wBitsPerSample, nChannels); /* waveInGetDevCaps allows an open handle instead of a device id */ - rc=waveInGetDevCapsW(HandleToUlong(win),&capsW,sizeof(capsW)); + rc=waveInGetDevCapsW((UINT_PTR)win,&capsW,sizeof(capsW)); ok(rc==MMSYSERR_NOERROR, "waveInGetDevCapsW(%s): MMSYSERR_NOERROR " "expected, got %s\n",dev_name(device),wave_in_error(rc));
1
0
0
0
Jactry Zeng : msi: Use CreateFileW() for handling path from cabinet_open() instead.
by Alexandre Julliard
20 Sep '23
20 Sep '23
Module: wine Branch: master Commit: 085e95cd5eceb36c3e21cb7d42adab5a6af38a38 URL:
https://gitlab.winehq.org/wine/wine/-/commit/085e95cd5eceb36c3e21cb7d42adab…
Author: Jactry Zeng <jzeng(a)codeweavers.com> Date: Tue Sep 19 10:12:44 2023 -0500 msi: Use CreateFileW() for handling path from cabinet_open() instead. --- dlls/msi/media.c | 12 ++++++++---- dlls/msi/msipriv.h | 26 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/dlls/msi/media.c b/dlls/msi/media.c index 50673f99cae..ecc51e60a4e 100644 --- a/dlls/msi/media.c +++ b/dlls/msi/media.c @@ -109,6 +109,8 @@ static INT_PTR CDECL cabinet_open(char *pszFile, int oflag, int pmode) DWORD dwAccess = 0; DWORD dwShareMode = 0; DWORD dwCreateDisposition = OPEN_EXISTING; + HANDLE handle; + WCHAR *path; switch (oflag & _O_ACCMODE) { @@ -131,8 +133,10 @@ static INT_PTR CDECL cabinet_open(char *pszFile, int oflag, int pmode) else if (oflag & _O_CREAT) dwCreateDisposition = CREATE_ALWAYS; - return (INT_PTR)CreateFileA(pszFile, dwAccess, dwShareMode, NULL, - dwCreateDisposition, 0, NULL); + path = strdupUtoW(pszFile); + handle = CreateFileW(path, dwAccess, dwShareMode, NULL, dwCreateDisposition, 0, NULL); + free(path); + return (INT_PTR)handle; } static UINT CDECL cabinet_read(INT_PTR hf, void *pv, UINT cb) @@ -577,11 +581,11 @@ static BOOL extract_cabinet( MSIPACKAGE* package, MSIMEDIAINFO *mi, LPVOID data return FALSE; } - cabinet = strdupWtoA( mi->cabinet ); + cabinet = strdupWtoU( mi->cabinet ); if (!cabinet) goto done; - cab_path = strdupWtoA( mi->sourcedir ); + cab_path = strdupWtoU( mi->sourcedir ); if (!cab_path) goto done; diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 89495b5a6a5..85cc5e257a7 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -1168,4 +1168,30 @@ static inline LPWSTR strdupAtoW( LPCSTR str ) return ret; } +static inline char *strdupWtoU( LPCWSTR str ) +{ + LPSTR ret = NULL; + DWORD len; + + if (!str) return ret; + len = WideCharToMultiByte( CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL); + ret = malloc( len ); + if (ret) + WideCharToMultiByte( CP_UTF8, 0, str, -1, ret, len, NULL, NULL ); + return ret; +} + +static inline LPWSTR strdupUtoW( LPCSTR str ) +{ + LPWSTR ret = NULL; + DWORD len; + + if (!str) return ret; + len = MultiByteToWideChar( CP_UTF8, 0, str, -1, NULL, 0 ); + ret = malloc( len * sizeof(WCHAR) ); + if (ret) + MultiByteToWideChar( CP_UTF8, 0, str, -1, ret, len ); + return ret; +} + #endif /* __WINE_MSI_PRIVATE__ */
1
0
0
0
Alex Henrie : wshom: Use the wcsdup function instead of reimplementing it.
by Alexandre Julliard
20 Sep '23
20 Sep '23
Module: wine Branch: master Commit: 9ef927472ceef8a0334b8a93532dd48c8abfe7a0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/9ef927472ceef8a0334b8a93532dd4…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Tue Sep 19 23:37:54 2023 -0600 wshom: Use the wcsdup function instead of reimplementing it. --- dlls/wshom.ocx/shell.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/wshom.ocx/shell.c b/dlls/wshom.ocx/shell.c index 845f931be70..69db995cd0d 100644 --- a/dlls/wshom.ocx/shell.c +++ b/dlls/wshom.ocx/shell.c @@ -1311,8 +1311,7 @@ static WCHAR *split_command( BSTR cmd, WCHAR **params ) WCHAR *ret, *ptr; BOOL in_quotes = FALSE; - if (!(ret = malloc((lstrlenW(cmd) + 1) * sizeof(WCHAR)))) return NULL; - lstrcpyW( ret, cmd ); + if (!(ret = wcsdup(cmd))) return NULL; *params = NULL; for (ptr = ret; *ptr; ptr++)
1
0
0
0
Alex Henrie : shell32: Use the wcsdup function instead of reimplementing it.
by Alexandre Julliard
20 Sep '23
20 Sep '23
Module: wine Branch: master Commit: 42d134684684448ba7ed5f4660cc8b35728fc614 URL:
https://gitlab.winehq.org/wine/wine/-/commit/42d134684684448ba7ed5f4660cc8b…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Tue Sep 19 23:28:15 2023 -0600 shell32: Use the wcsdup function instead of reimplementing it. --- dlls/shell32/shelllink.c | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c index 8fe1529891b..30cd038728f 100644 --- a/dlls/shell32/shelllink.c +++ b/dlls/shell32/shelllink.c @@ -705,8 +705,7 @@ static HRESULT Stream_LoadAdvertiseInfo( IStream* stm, LPWSTR *str ) return E_FAIL; } - *str = malloc( (lstrlenW(buffer.szwDarwinID) + 1) * sizeof(WCHAR) ); - lstrcpyW( *str, buffer.szwDarwinID ); + *str = wcsdup( buffer.szwDarwinID ); return S_OK; } @@ -1161,11 +1160,9 @@ static HRESULT ShellLink_UpdatePath(LPCWSTR sPathRel, LPCWSTR path, LPCWSTR sWor if (!*abs_path) lstrcpyW(abs_path, sPathRel); - *psPath = malloc((lstrlenW(abs_path) + 1) * sizeof(WCHAR)); + *psPath = wcsdup(abs_path); if (!*psPath) return E_OUTOFMEMORY; - - lstrcpyW(*psPath, abs_path); } return S_OK; @@ -1745,11 +1742,9 @@ static HRESULT WINAPI IShellLinkW_fnSetIDList(IShellLinkW * iface, LPCITEMIDLIST if ( SHGetPathFromIDListW( pidl, path ) ) { - This->sPath = malloc((lstrlenW(path) + 1) * sizeof(WCHAR)); + This->sPath = wcsdup(path); if (!This->sPath) return E_OUTOFMEMORY; - - lstrcpyW(This->sPath, path); } This->bDirty = TRUE; @@ -1779,11 +1774,9 @@ static HRESULT WINAPI IShellLinkW_fnSetDescription(IShellLinkW * iface, LPCWSTR free(This->sDescription); if (pszName) { - This->sDescription = malloc( (lstrlenW( pszName ) + 1) * sizeof(WCHAR) ); + This->sDescription = wcsdup(pszName); if ( !This->sDescription ) return E_OUTOFMEMORY; - - lstrcpyW( This->sDescription, pszName ); } else This->sDescription = NULL; @@ -1813,10 +1806,9 @@ static HRESULT WINAPI IShellLinkW_fnSetWorkingDirectory(IShellLinkW * iface, LPC TRACE("(%p)->(dir=%s)\n",This, debugstr_w(pszDir)); free(This->sWorkDir); - This->sWorkDir = malloc( (lstrlenW( pszDir ) + 1) * sizeof(WCHAR) ); + This->sWorkDir = wcsdup(pszDir); if ( !This->sWorkDir ) return E_OUTOFMEMORY; - lstrcpyW( This->sWorkDir, pszDir ); This->bDirty = TRUE; return S_OK; @@ -1845,10 +1837,9 @@ static HRESULT WINAPI IShellLinkW_fnSetArguments(IShellLinkW * iface, LPCWSTR ps free(This->sArgs); if (pszArgs) { - This->sArgs = malloc( (lstrlenW( pszArgs ) + 1) * sizeof(WCHAR) ); + This->sArgs = wcsdup(pszArgs); if ( !This->sArgs ) return E_OUTOFMEMORY; - lstrcpyW( This->sArgs, pszArgs ); } else This->sArgs = NULL; @@ -1928,11 +1919,9 @@ static HRESULT WINAPI IShellLinkW_fnSetIconLocation(IShellLinkW * iface, const W free(This->sIcoPath); if (path) { - size_t len = (lstrlenW(path) + 1) * sizeof(WCHAR); - This->sIcoPath = malloc(len); + This->sIcoPath = wcsdup(path); if (!This->sIcoPath) return E_OUTOFMEMORY; - memcpy(This->sIcoPath, path, len); } else This->sIcoPath = NULL; @@ -1949,10 +1938,9 @@ static HRESULT WINAPI IShellLinkW_fnSetRelativePath(IShellLinkW * iface, LPCWSTR TRACE("(%p)->(path=%s %lx)\n",This, debugstr_w(pszPathRel), dwReserved); free(This->sPathRel); - This->sPathRel = malloc( (lstrlenW( pszPathRel ) + 1) * sizeof(WCHAR) ); + This->sPathRel = wcsdup(pszPathRel); if ( !This->sPathRel ) return E_OUTOFMEMORY; - lstrcpyW( This->sPathRel, pszPathRel ); This->bDirty = TRUE; return ShellLink_UpdatePath(This->sPathRel, This->sPath, This->sWorkDir, &This->sPath); @@ -1975,23 +1963,20 @@ static HRESULT WINAPI IShellLinkW_fnResolve(IShellLinkW * iface, HWND hwnd, DWOR bSuccess = SHGetPathFromIDListW(This->pPidl, buffer); if (bSuccess && *buffer) { - This->sPath = malloc((lstrlenW(buffer) + 1) * sizeof(WCHAR)); + This->sPath = wcsdup(buffer); if (!This->sPath) return E_OUTOFMEMORY; - lstrcpyW(This->sPath, buffer); - This->bDirty = TRUE; } else hr = S_OK; /* don't report an error occurred while just caching information */ } if (!This->sIcoPath && This->sPath) { - This->sIcoPath = malloc((lstrlenW(This->sPath) + 1) * sizeof(WCHAR)); + This->sIcoPath = wcsdup(This->sPath); if (!This->sIcoPath) return E_OUTOFMEMORY; - lstrcpyW(This->sIcoPath, This->sPath); This->iIcoNdx = 0; This->bDirty = TRUE; @@ -2151,14 +2136,12 @@ static HRESULT WINAPI IShellLinkW_fnSetPath(IShellLinkW * iface, LPCWSTR pszFile This->pPidl = SHSimpleIDListFromPathW(pszFile); ShellLink_GetVolumeInfo(buffer, &This->volume); - This->sPath = malloc( (lstrlenW( buffer ) + 1) * sizeof(WCHAR) ); + This->sPath = wcsdup(buffer); if (!This->sPath) { free(unquoted); return E_OUTOFMEMORY; } - - lstrcpyW(This->sPath, buffer); } This->bDirty = TRUE; free(unquoted);
1
0
0
0
Alex Henrie : ncrypt: Use the wcsdup function instead of reimplementing it.
by Alexandre Julliard
20 Sep '23
20 Sep '23
Module: wine Branch: master Commit: 82faa82339cf25a573f729bb159c683c626127ec URL:
https://gitlab.winehq.org/wine/wine/-/commit/82faa82339cf25a573f729bb159c68…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Tue Sep 19 23:18:36 2023 -0600 ncrypt: Use the wcsdup function instead of reimplementing it. --- dlls/ncrypt/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/ncrypt/main.c b/dlls/ncrypt/main.c index fa2eff49774..8a720382bef 100644 --- a/dlls/ncrypt/main.c +++ b/dlls/ncrypt/main.c @@ -95,13 +95,12 @@ struct object_property *add_object_property(struct object *object, const WCHAR * } memset(property, 0, sizeof(*property)); - if (!(property->key = malloc((lstrlenW(name) + 1) * sizeof(WCHAR)))) + if (!(property->key = wcsdup(name))) { ERR("Error allocating memory.\n"); return NULL; } - lstrcpyW(property->key, name); return property; }
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
92
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
82
83
84
85
86
87
88
89
90
91
92
Results per page:
10
25
50
100
200