diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2007-02-22 01:10:45 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2007-02-22 01:10:45 +0000 |
commit | 99e039125ac714e83b6a13fc684f880bb310abe8 (patch) | |
tree | ecc033897eb8a810bb7fba71496e31973e8366d7 | |
parent | 00c3b8b4921a4806a55bf2cf20f16a0d89151a15 (diff) |
Pass sizeof(buf) to fgets instead of hard-coded number.
From Charles Longeau.
OK moritz@ and jakob@.
-rw-r--r-- | usr.sbin/bind/bin/dig/dighost.c | 2 |
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); |