summaryrefslogtreecommitdiffstats
path: root/lib/socket_wrapper/socket_wrapper.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2014-06-03 15:07:07 +0200
committerMichael Adam <obnox@samba.org>2014-06-05 23:57:10 +0200
commit1f03de017bdf16619a7e8785d1c6042995312a87 (patch)
tree32760e91a3800a8195d27dd53e1275d9f02c28a6 /lib/socket_wrapper/socket_wrapper.c
parent74ade40e3efe1cc779c636e5b6a8ea96ae349c52 (diff)
downloadsamba-1f03de017bdf16619a7e8785d1c6042995312a87.tar.gz
samba-1f03de017bdf16619a7e8785d1c6042995312a87.tar.xz
samba-1f03de017bdf16619a7e8785d1c6042995312a87.zip
swrap: Make sure cmbuf is not NULL.
CID 63532 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'lib/socket_wrapper/socket_wrapper.c')
-rw-r--r--lib/socket_wrapper/socket_wrapper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c
index 7275e73afef..b8b1ca35fdc 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -3441,7 +3441,7 @@ static ssize_t swrap_sendmsg_before(int fd,
if (cmlen == 0) {
msg->msg_controllen = 0;
msg->msg_control = NULL;
- } else if (cmlen < msg->msg_controllen) {
+ } else if (cmlen < msg->msg_controllen && cmbuf != NULL) {
memcpy(msg->msg_control, cmbuf, cmlen);
msg->msg_controllen = cmlen;
}