summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2007-02-18 23:50:48 +0000
committerRay Lai <ray@cvs.openbsd.org>2007-02-18 23:50:48 +0000
commitbc0d194e29c7a9ce8ab3a3a8dfaa3dd82faa30d3 (patch)
treeefe9ce73d7bb87ec45e075d8e8f4f11d00c12a7a /distrib
parent54bfa8c9a3c39230736bb326064d6091ba531504 (diff)
Use sizeof(buf) instead of hard coded numbers.
From Charles Longeau <chl at tuxfamily dot org> long ago. OK moritz@.
Diffstat (limited to 'distrib')
-rw-r--r--distrib/crunch/crunchide/crunchide.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/distrib/crunch/crunchide/crunchide.c b/distrib/crunch/crunchide/crunchide.c
index 0bf73bf9594..a8fd55be1cd 100644
--- a/distrib/crunch/crunchide/crunchide.c
+++ b/distrib/crunch/crunchide/crunchide.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crunchide.c,v 1.21 2006/12/26 10:20:11 deraadt Exp $ */
+/* $OpenBSD: crunchide.c,v 1.22 2007/02/18 23:50:46 ray Exp $ */
/*
* Copyright (c) 1994 University of Maryland
@@ -194,7 +194,7 @@ add_file_to_keep_list(char *filename)
perror(filename);
usage();
}
- while (fgets(symbol, 1024, keepf)) {
+ while (fgets(symbol, sizeof(symbol), keepf)) {
len = strlen(symbol);
if (len && symbol[len - 1] == '\n')
symbol[len - 1] = '\0';