summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorray <ray@openbsd.org>2007-02-22 01:10:44 +0000
committerray <ray@openbsd.org>2007-02-22 01:10:44 +0000
commit3a031ca95b86c43a4e112e456ab8cba4ea6de6fb (patch)
tree789ba467172a470aa991334724254bcc9841b669
parentFix a reference to WFHARD in a comment; it was renamed WFFULL months (diff)
downloadwireguard-openbsd-3a031ca95b86c43a4e112e456ab8cba4ea6de6fb.tar.xz
wireguard-openbsd-3a031ca95b86c43a4e112e456ab8cba4ea6de6fb.zip
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.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);