From 99e039125ac714e83b6a13fc684f880bb310abe8 Mon Sep 17 00:00:00 2001 From: Ray Lai Date: Thu, 22 Feb 2007 01:10:45 +0000 Subject: Pass sizeof(buf) to fgets instead of hard-coded number. From Charles Longeau. OK moritz@ and jakob@. --- usr.sbin/bind/bin/dig/dighost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bind/bin/dig/dighost.c b/usr.sbin/bind/bin/dig/dighost.c index 1d9ef8c8a6a..06b0d3538c3 100644 --- a/usr.sbin/bind/bin/dig/dighost.c +++ b/usr.sbin/bind/bin/dig/dighost.c @@ -3590,7 +3590,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); -- cgit v1.2.3