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 | 12452d919898af64a3f6aa3403aa56c2cceb5ed3 (patch) | |
tree | 68ffc0f4d8f8f54f5f31e30e52c78a95099299eb /makewhatis.c | |
parent | c3e574a1addab4c2ae74e07c8eefd5c7afb65454 (diff) | |
download | mandoc-12452d919898af64a3f6aa3403aa56c2cceb5ed3.tar.gz mandoc-12452d919898af64a3f6aa3403aa56c2cceb5ed3.tar.zst mandoc-12452d919898af64a3f6aa3403aa56c2cceb5ed3.zip |
Don't let empty strings into the makewhatis keyword database.
Diffstat (limited to 'makewhatis.c')
-rw-r--r-- | makewhatis.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/makewhatis.c b/makewhatis.c index ec7f6676..94202dd5 100644 --- a/makewhatis.c +++ b/makewhatis.c @@ -1,4 +1,4 @@ -/* $Id: makewhatis.c,v 1.3 2011/06/21 13:05:14 kristaps Exp $ */ +/* $Id: makewhatis.c,v 1.4 2011/06/21 13:13:15 kristaps Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -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) { |