summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/monitor_fdpass.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2004-08-13 02:51:49 +0000
committerDamien Miller <djm@cvs.openbsd.org>2004-08-13 02:51:49 +0000
commitd21b44b6716776eade78a52e6068d52b82bdd58e (patch)
treeb5c4e88f74c1d814fac5d827ca0bb103db5b146a /usr.bin/ssh/monitor_fdpass.c
parent1730c3b24ef569d8a5d16c63d0ad63aaa745812c (diff)
extra check for no message case; ok markus, deraadt, hshoexer, henning
Diffstat (limited to 'usr.bin/ssh/monitor_fdpass.c')
-rw-r--r--usr.bin/ssh/monitor_fdpass.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/ssh/monitor_fdpass.c b/usr.bin/ssh/monitor_fdpass.c
index 540ff793de9..609b6253b45 100644
--- a/usr.bin/ssh/monitor_fdpass.c
+++ b/usr.bin/ssh/monitor_fdpass.c
@@ -24,7 +24,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: monitor_fdpass.c,v 1.5 2004/06/21 17:36:31 avsm Exp $");
+RCSID("$OpenBSD: monitor_fdpass.c,v 1.6 2004/08/13 02:51:48 djm Exp $");
#include <sys/uio.h>
@@ -89,6 +89,8 @@ mm_receive_fd(int sock)
__func__, (long)n);
cmsg = CMSG_FIRSTHDR(&msg);
+ if (cmsg == NULL)
+ fatal("%s: no message header", __func__);
if (cmsg->cmsg_type != SCM_RIGHTS)
fatal("%s: expected type %d got %d", __func__,
SCM_RIGHTS, cmsg->cmsg_type);