projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b9a76a
)
Zero out cbuf to stop complaints from valgrind
author
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Fri, 28 Feb 2014 19:05:02 +0000
(19:05 +0000)
committer
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Fri, 28 Feb 2014 19:05:28 +0000
(19:05 +0000)
src/lib/udpfromto.c
patch
|
blob
|
history
diff --git
a/src/lib/udpfromto.c
b/src/lib/udpfromto.c
index
f16fe36
..
c533abb
100644
(file)
--- a/
src/lib/udpfromto.c
+++ b/
src/lib/udpfromto.c
@@
-225,6
+225,7
@@
int recvfromto(int s, void *buf, size_t len, int flags,
}
/* Set up iov and msgh structures. */
+ memset(&cbuf, 0, sizeof(cbuf));
memset(&msgh, 0, sizeof(struct msghdr));
iov.iov_base = buf;
iov.iov_len = len;
@@
-337,7
+338,8
@@
int sendfromto(int s, void *buf, size_t len, int flags,
return sendto(s, buf, len, flags, to, tolen);
}
- /* Set up iov and msgh structures. */
+ /* Set up control buffer iov and msgh structures. */
+ memset(&cbuf, 0, sizeof(cbuf));
memset(&msgh, 0, sizeof(msgh));
memset(&iov, 0, sizeof(iov));
iov.iov_base = buf;