Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
31995b53
Commit
31995b53
authored
Jul 21, 2014
by
Howard Chu
Browse files
ITS
#7027
fix bugs in prev commit
parent
5de85b92
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/libldap/dnssrv.c
View file @
31995b53
...
...
@@ -323,7 +323,7 @@ int ldap_domain2hostlist(
goto
out
;
}
hostent_head
[
hostent_count
].
priority
=
priority
;
hostent_head
[
hostent_count
].
weight
=
priority
;
hostent_head
[
hostent_count
].
weight
=
weight
;
hostent_head
[
hostent_count
].
port
=
port
;
strncpy
(
hostent_head
[
hostent_count
].
hostname
,
host
,
255
);
hostent_count
=
hostent_count
+
1
;
...
...
@@ -336,7 +336,7 @@ add_size:;
for
(
i
=
0
;
i
<
hostent_count
;
i
++
){
int
buflen
;
buflen
=
strlen
(
hostent_head
[
i
].
hostname
)
+
STRLENOF
(
":65
355"
);
buflen
=
strlen
(
hostent_head
[
i
].
hostname
)
+
STRLENOF
(
":65
535 "
);
hostlist
=
(
char
*
)
LDAP_REALLOC
(
hostlist
,
cur
+
buflen
+
1
);
if
(
hostlist
==
NULL
)
{
rc
=
LDAP_NO_MEMORY
;
...
...
Write
Preview
Supports
Markdown
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