diff options
Diffstat (limited to 'usr.sbin/bind/lib/isc/unix')
-rw-r--r-- | usr.sbin/bind/lib/isc/unix/privsep_fdpass.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/bind/lib/isc/unix/privsep_fdpass.c b/usr.sbin/bind/lib/isc/unix/privsep_fdpass.c index d0d91011268..f52bee57179 100644 --- a/usr.sbin/bind/lib/isc/unix/privsep_fdpass.c +++ b/usr.sbin/bind/lib/isc/unix/privsep_fdpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep_fdpass.c,v 1.2 2004/04/19 23:33:46 avsm Exp $ */ +/* $OpenBSD: privsep_fdpass.c,v 1.3 2004/08/13 02:51:48 djm Exp $ */ /* * Copyright 2001 Niels Provos <provos@citi.umich.edu> @@ -105,6 +105,10 @@ receive_fd(int sock) __func__, (long)n); if (result == 0) { cmsg = CMSG_FIRSTHDR(&msg); + if (cmsg == NULL) { + warnx("%s: no message header", __func__); + return (-1); + } if (cmsg->cmsg_type != SCM_RIGHTS) warnx("%s: expected type %d got %d", __func__, SCM_RIGHTS, cmsg->cmsg_type); |