summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/ndiscvt/inf.c6
-rw-r--r--usr.sbin/ndiscvt/inf.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/ndiscvt/inf.c b/usr.sbin/ndiscvt/inf.c
index fe4db6a..4b30da0 100644
--- a/usr.sbin/ndiscvt/inf.c
+++ b/usr.sbin/ndiscvt/inf.c
@@ -887,6 +887,12 @@ regkey_add (const char *r)
void
push_word (const char *w)
{
+
+ if (idx == W_MAX) {
+ fprintf(stderr, "too many words; try bumping W_MAX in inf.h\n");
+ exit(1);
+ }
+
if (w && strlen(w))
words[idx++] = w;
else
diff --git a/usr.sbin/ndiscvt/inf.h b/usr.sbin/ndiscvt/inf.h
index 8d0b0c1..ba08d67 100644
--- a/usr.sbin/ndiscvt/inf.h
+++ b/usr.sbin/ndiscvt/inf.h
@@ -4,7 +4,7 @@
* $FreeBSD$
*/
-#define W_MAX 16
+#define W_MAX 32
struct section {
const char * name;
OpenPOWER on IntegriCloud