diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-06-21 13:13:15 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-06-21 13:13:15 +0000 |
commit | 95941be4aefac838968002450363fc26c2ce094b (patch) | |
tree | c1103193d5bf17545fe29619245cfc203cb3c85a /makewhatis.c | |
parent | def18ef5006a69910ed1dcf005645809052c2b1e (diff) | |
download | mandoc-95941be4aefac838968002450363fc26c2ce094b.tar.gz |
Don't let empty strings into the makewhatis keyword database.
Diffstat (limited to 'makewhatis.c')
-rw-r--r-- | makewhatis.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/makewhatis.c b/makewhatis.c index 8b1690d3..465e331b 100644 --- a/makewhatis.c +++ b/makewhatis.c @@ -792,7 +792,8 @@ hash_put(DB *db, const struct buf *buf, int mask) int rc; key.data = buf->cp; - if (0 == (key.size = buf->len)) + + if ((key.size = buf->len) < 2) return; if ((rc = (*db->get)(db, &key, &val, 0)) < 0) { |