From a630d60b8b628cb2ce46b906dc7b1a5b83b74ed5 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 27 Feb 2007 00:58:08 +0000 Subject: [PATCH] 2152. [cleanup] Use sizeof(buf) instead of fixed number in dighost.c:get_trusted_key(). [RT #16678] --- CHANGES | 3 +++ bin/dig/dighost.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 9e06b3264f..12d7074106 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2152. [cleanup] Use sizeof(buf) instead of fixed number in + dighost.c:get_trusted_key(). [RT #16678] + 2151. [bug] Missing newline in usage message for journalprint. [RT #16679] diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index b2139495cf..5219f5ec0f 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dighost.c,v 1.300 2007/02/26 00:27:09 marka Exp $ */ +/* $Id: dighost.c,v 1.301 2007/02/27 00:58:08 marka Exp $ */ /*! \file * \note @@ -3892,7 +3892,7 @@ get_trusted_key(isc_mem_t *mctx) filename); return (ISC_R_FAILURE); } - while (fgets(buf, 1500, fp) != NULL) { + while (fgets(buf, sizeof(buf), fp) != NULL) { result = opentmpkey(mctx,"tmp_file", &filetemp, &fptemp); if (result != ISC_R_SUCCESS) { fclose(fp);