summaryrefslogtreecommitdiff
path: root/usr.sbin/bind/bin
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2007-02-22 01:10:45 +0000
committerRay Lai <ray@cvs.openbsd.org>2007-02-22 01:10:45 +0000
commit99e039125ac714e83b6a13fc684f880bb310abe8 (patch)
treeecc033897eb8a810bb7fba71496e31973e8366d7 /usr.sbin/bind/bin
parent00c3b8b4921a4806a55bf2cf20f16a0d89151a15 (diff)
Pass sizeof(buf) to fgets instead of hard-coded number.
From Charles Longeau. OK moritz@ and jakob@.
Diffstat (limited to 'usr.sbin/bind/bin')
-rw-r--r--usr.sbin/bind/bin/dig/dighost.c2
1 files changed, 1 insertions, 1 deletions
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);