(read_words): catch empty file case, will cause PBE (division by zero)

later. From Tobias Stoeckmann.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17001 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-04-04 14:19:13 +00:00
parent 2cd3764e7b
commit b866404406

View File

@@ -57,6 +57,8 @@ read_words (const char *filename, char ***ret_w)
w[n++] = estrdup (buf);
}
*ret_w = w;
if (n == 0)
errx(1, "%s is an empty file, no words to try", filename);
return n;
}