Module: wine Branch: master Commit: 9ef927472ceef8a0334b8a93532dd48c8abfe7a0 URL: https://gitlab.winehq.org/wine/wine/-/commit/9ef927472ceef8a0334b8a93532dd48...
Author: Alex Henrie alexhenrie24@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++)