From a375150af2736b7dcbd93a42c012768cc37206b4 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Thu, 18 May 2000 17:56:35 +0000 Subject: [PATCH] REQUIRE() checking in isc_log_doit could seg fault --- lib/isc/log.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/isc/log.c b/lib/isc/log.c index ef5c9e9350..d7069a2d3e 100644 --- a/lib/isc/log.c +++ b/lib/isc/log.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: log.c,v 1.32 2000/05/18 17:20:15 tale Exp $ */ +/* $Id: log.c,v 1.33 2000/05/18 17:56:35 bwelling Exp $ */ /* Principal Authors: DCL */ @@ -1158,8 +1158,12 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category, isc_result_t result; REQUIRE(lctx == NULL || VALID_CONTEXT(lctx)); - REQUIRE(category != NULL && category->id < lctx->category_count); - REQUIRE(module != NULL && module->id < lctx->module_count); + REQUIRE(category != NULL); + REQUIRE(module != NULL); + if (lctx != NULL) { + REQUIRE(category->id < lctx->category_count); + REQUIRE(module->id < lctx->module_count); + } REQUIRE(level != ISC_LOG_DYNAMIC); REQUIRE(format != NULL);