Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
5e6bbf8c
Commit
5e6bbf8c
authored
Mar 05, 2018
by
Mark Nunberg
Browse files
saddr should be addrlen bytes
Not sizeof saddr.
parent
49974c93
Changes
1
Show whitespace changes
Inline
Side-by-side
net.c
View file @
5e6bbf8c
...
...
@@ -402,7 +402,7 @@ addrretry:
if
(
c
->
saddr
)
{
free
(
c
->
saddr
);
}
c
->
saddr
=
malloc
(
sizeof
(
*
p
->
ai_addr
)
);
c
->
saddr
=
malloc
(
p
->
ai_addr
len
);
memcpy
(
c
->
saddr
,
p
->
ai_addr
,
p
->
ai_addrlen
);
c
->
addrlen
=
p
->
ai_addrlen
;
...
...
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