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:
parent
74ade40e3e
commit
1f03de017b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user