diff options
| author | Andreas Schneider <asn@samba.org> | 2014-05-27 09:09:24 +0200 |
|---|---|---|
| committer | Andreas Schneider <asn@samba.org> | 2014-05-27 09:51:43 +0200 |
| commit | 43a39c5e288423d1be5b5544d8e13847726d7eda (patch) | |
| tree | 18014ec8fe0cf24a119c3ce923f35e0816feaec9 | |
| parent | 98441f8591ff6f57fe26f650b4028ac26cd75527 (diff) | |
| download | socket_wrapper-43a39c5e288423d1be5b5544d8e13847726d7eda.tar.gz socket_wrapper-43a39c5e288423d1be5b5544d8e13847726d7eda.tar.xz socket_wrapper-43a39c5e288423d1be5b5544d8e13847726d7eda.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>
| -rw-r--r-- | src/socket_wrapper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index 7275e73..b8b1ca3 100644 --- a/src/socket_wrapper.c +++ b/src/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; } |
