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
7f5a7189
Commit
7f5a7189
authored
Nov 20, 2022
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wldap32: Use the wcsdup function instead of reimplementing it.
parent
5d1820c4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
13 deletions
+5
-13
control.c
dlls/wldap32/control.c
+1
-1
page.c
dlls/wldap32/page.c
+2
-2
winldap_private.h
dlls/wldap32/winldap_private.h
+2
-10
No files found.
dlls/wldap32/control.c
View file @
7f5a7189
...
@@ -215,7 +215,7 @@ ULONG CDECL ldap_encode_sort_controlW( LDAP *ld, LDAPSortKeyW **sortkeys, LDAPCo
...
@@ -215,7 +215,7 @@ ULONG CDECL ldap_encode_sort_controlW( LDAP *ld, LDAPSortKeyW **sortkeys, LDAPCo
if
((
result
=
ldap_create_sort_controlW
(
ld
,
sortkeys
,
critical
,
&
control
))
==
WLDAP32_LDAP_SUCCESS
)
if
((
result
=
ldap_create_sort_controlW
(
ld
,
sortkeys
,
critical
,
&
control
))
==
WLDAP32_LDAP_SUCCESS
)
{
{
ret
->
ldctl_oid
=
strdupW
(
control
->
ldctl_oid
);
ret
->
ldctl_oid
=
wcsdup
(
control
->
ldctl_oid
);
bv_val_dup
(
&
control
->
ldctl_value
,
&
ret
->
ldctl_value
);
bv_val_dup
(
&
control
->
ldctl_value
,
&
ret
->
ldctl_value
);
ret
->
ldctl_iscritical
=
control
->
ldctl_iscritical
;
ret
->
ldctl_iscritical
=
control
->
ldctl_iscritical
;
ldap_control_freeW
(
control
);
ldap_control_freeW
(
control
);
...
...
dlls/wldap32/page.c
View file @
7f5a7189
...
@@ -297,8 +297,8 @@ LDAPSearch * CDECL ldap_search_init_pageW( LDAP *ld, WCHAR *dn, ULONG scope, WCH
...
@@ -297,8 +297,8 @@ LDAPSearch * CDECL ldap_search_init_pageW( LDAP *ld, WCHAR *dn, ULONG scope, WCH
return
NULL
;
return
NULL
;
}
}
if
(
dn
&&
!
(
search
->
dn
=
strdupW
(
dn
)))
goto
fail
;
if
(
dn
&&
!
(
search
->
dn
=
wcsdup
(
dn
)))
goto
fail
;
if
(
filter
&&
!
(
search
->
filter
=
strdupW
(
filter
)))
goto
fail
;
if
(
filter
&&
!
(
search
->
filter
=
wcsdup
(
filter
)))
goto
fail
;
if
(
attrs
&&
!
(
search
->
attrs
=
strarraydupW
(
attrs
)))
goto
fail
;
if
(
attrs
&&
!
(
search
->
attrs
=
strarraydupW
(
attrs
)))
goto
fail
;
len
=
serverctrls
?
controlarraylenW
(
serverctrls
)
:
0
;
len
=
serverctrls
?
controlarraylenW
(
serverctrls
)
:
0
;
...
...
dlls/wldap32/winldap_private.h
View file @
7f5a7189
...
@@ -542,14 +542,6 @@ static inline char *strdupU( const char *src )
...
@@ -542,14 +542,6 @@ static inline char *strdupU( const char *src )
return
dst
;
return
dst
;
}
}
static
inline
WCHAR
*
strdupW
(
const
WCHAR
*
src
)
{
WCHAR
*
dst
;
if
(
!
src
)
return
NULL
;
if
((
dst
=
malloc
(
(
lstrlenW
(
src
)
+
1
)
*
sizeof
(
WCHAR
)
)))
lstrcpyW
(
dst
,
src
);
return
dst
;
}
static
inline
char
*
strWtoU
(
const
WCHAR
*
str
)
static
inline
char
*
strWtoU
(
const
WCHAR
*
str
)
{
{
char
*
ret
=
NULL
;
char
*
ret
=
NULL
;
...
@@ -652,7 +644,7 @@ static inline WCHAR **strarraydupW( WCHAR **strarray )
...
@@ -652,7 +644,7 @@ static inline WCHAR **strarraydupW( WCHAR **strarray )
{
{
WCHAR
**
p
=
strarray
,
**
q
=
ret
;
WCHAR
**
p
=
strarray
,
**
q
=
ret
;
while
(
*
p
)
*
q
++
=
strdupW
(
*
p
++
);
while
(
*
p
)
*
q
++
=
wcsdup
(
*
p
++
);
*
q
=
NULL
;
*
q
=
NULL
;
}
}
}
}
...
@@ -1225,7 +1217,7 @@ static inline LDAPControlW *controldupW( LDAPControlW *control )
...
@@ -1225,7 +1217,7 @@ static inline LDAPControlW *controldupW( LDAPControlW *control )
return
NULL
;
return
NULL
;
}
}
ret
->
ldctl_oid
=
strdupW
(
control
->
ldctl_oid
);
ret
->
ldctl_oid
=
wcsdup
(
control
->
ldctl_oid
);
ret
->
ldctl_value
.
bv_len
=
len
;
ret
->
ldctl_value
.
bv_len
=
len
;
ret
->
ldctl_value
.
bv_val
=
val
;
ret
->
ldctl_value
.
bv_val
=
val
;
ret
->
ldctl_iscritical
=
control
->
ldctl_iscritical
;
ret
->
ldctl_iscritical
=
control
->
ldctl_iscritical
;
...
...
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