diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2004-08-13 02:51:49 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2004-08-13 02:51:49 +0000 |
commit | d21b44b6716776eade78a52e6068d52b82bdd58e (patch) | |
tree | b5c4e88f74c1d814fac5d827ca0bb103db5b146a /sbin/isakmpd | |
parent | 1730c3b24ef569d8a5d16c63d0ad63aaa745812c (diff) |
extra check for no message case; ok markus, deraadt, hshoexer, henning
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r-- | sbin/isakmpd/monitor_fdpass.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sbin/isakmpd/monitor_fdpass.c b/sbin/isakmpd/monitor_fdpass.c index 8031416e7e4..8f3d1a44320 100644 --- a/sbin/isakmpd/monitor_fdpass.c +++ b/sbin/isakmpd/monitor_fdpass.c @@ -94,6 +94,10 @@ mm_receive_fd(int socket) return -1; } cmsg = CMSG_FIRSTHDR(&msg); + if (cmsg == NULL) { + log_error("%s: no message header", __func__); + return -1; + } if (cmsg->cmsg_type != SCM_RIGHTS) { log_error("%s: expected type %d got %d", __func__, SCM_RIGHTS, cmsg->cmsg_type); |