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 /usr.sbin/bind | |
parent | 1730c3b24ef569d8a5d16c63d0ad63aaa745812c (diff) |
extra check for no message case; ok markus, deraadt, hshoexer, henning
Diffstat (limited to 'usr.sbin/bind')
-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); |