]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2152. [cleanup] Use sizeof(buf) instead of fixed number in
authorMark Andrews <marka@isc.org>
Tue, 27 Feb 2007 01:07:15 +0000 (01:07 +0000)
committerMark Andrews <marka@isc.org>
Tue, 27 Feb 2007 01:07:15 +0000 (01:07 +0000)
                        dighost.c:get_trusted_key(). [RT #16678]

CHANGES
bin/dig/dighost.c

diff --git a/CHANGES b/CHANGES
index ce99c9b5387d4c26af8d38d52370d3afe44f4a11..86d3aae8661050b3adeb3168a6cc82cdd31ec8bd 100644 (file)
--- 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]
 
index b48b5e7ee43cecd5acc920be4049cd4b0134af48..f052f32ccc67710386d07f19d1f33a44574da309 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dighost.c,v 1.221.2.19.2.39 2007/02/14 23:45:42 marka Exp $ */
+/* $Id: dighost.c,v 1.221.2.19.2.40 2007/02/27 01:07:15 marka Exp $ */
 
 /*
  * Notice to programmers:  Do not use this code as an example of how to
@@ -3612,7 +3612,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);