Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
5f981c37
Commit
5f981c37
authored
Nov 20, 2022
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Use the wcsdup function instead of reimplementing it.
parent
ebe6e747
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
secur32.c
dlls/secur32/secur32.c
+4
-11
No files found.
dlls/secur32/secur32.c
View file @
5f981c37
...
...
@@ -174,13 +174,6 @@ PSecurityFunctionTableW WINAPI InitSecurityInterfaceW(void)
return
&
securityFunctionTableW
;
}
static
WCHAR
*
strdupW
(
const
WCHAR
*
str
)
{
WCHAR
*
ret
=
NULL
;
if
(
str
&&
(
ret
=
malloc
(
(
wcslen
(
str
)
+
1
)
*
sizeof
(
WCHAR
)
)))
wcscpy
(
ret
,
str
);
return
ret
;
}
static
void
_makeFnTableA
(
PSecurityFunctionTableA
fnTableA
,
const
SecurityFunctionTableA
*
inFnTableA
,
const
SecurityFunctionTableW
*
inFnTableW
)
...
...
@@ -345,8 +338,8 @@ static void _copyPackageInfo(PSecPkgInfoW info, const SecPkgInfoA *inInfoA,
memcpy
(
info
,
inInfoW
?
inInfoW
:
(
const
SecPkgInfoW
*
)
inInfoA
,
sizeof
(
*
info
));
if
(
inInfoW
)
{
info
->
Name
=
strdupW
(
inInfoW
->
Name
);
info
->
Comment
=
strdupW
(
inInfoW
->
Comment
);
info
->
Name
=
wcsdup
(
inInfoW
->
Name
);
info
->
Comment
=
wcsdup
(
inInfoW
->
Comment
);
}
else
{
...
...
@@ -385,14 +378,14 @@ SecureProvider *SECUR32_addProvider(const SecurityFunctionTableA *fnTableA,
if
(
fnTableA
||
fnTableW
)
{
ret
->
moduleName
=
moduleName
?
strdupW
(
moduleName
)
:
NULL
;
ret
->
moduleName
=
wcsdup
(
moduleName
)
;
_makeFnTableA
(
&
ret
->
fnTableA
,
fnTableA
,
fnTableW
);
_makeFnTableW
(
&
ret
->
fnTableW
,
fnTableA
,
fnTableW
);
ret
->
loaded
=
!
moduleName
;
}
else
{
ret
->
moduleName
=
strdupW
(
moduleName
);
ret
->
moduleName
=
wcsdup
(
moduleName
);
ret
->
loaded
=
FALSE
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment