1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

swrap: Make sure cmbuf is not NULL.

CID 63532

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Andreas Schneider 2014-06-03 15:07:07 +02:00 committed by Michael Adam
parent 74ade40e3e
commit 1f03de017b

View File

@ -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;
}