* mdocml: Don't let empty strings into the makewhatis keyword database.
@ 2011-06-21 13:13 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-06-21 13:13 UTC (permalink / raw)
To: source
Log Message:
-----------
Don't let empty strings into the makewhatis keyword database.
Modified Files:
--------------
mdocml:
Makefile
makewhatis.c
Revision Data
-------------
Index: makewhatis.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/makewhatis.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lmakewhatis.c -Lmakewhatis.c -u -p -r1.3 -r1.4
--- makewhatis.c
+++ makewhatis.c
@@ -792,7 +792,8 @@ hash_put(DB *db, const struct buf *buf,
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) {
Index: Makefile
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/Makefile,v
retrieving revision 1.349
retrieving revision 1.350
diff -LMakefile -LMakefile -u -p -r1.349 -r1.350
--- Makefile
+++ Makefile
@@ -353,7 +353,7 @@ llib-lmandoc.ln: $(MANDOC_LNS)
# You'll need -ldb for Linux.
makewhatis: $(MAKEWHATIS_OBJS) libmandoc.a
- $(CC) -o $@ $(MAKEWHATIS_OBJS) libmandoc.a
+ $(CC) -o $@ $(MAKEWHATIS_OBJS) libmandoc.a -ldb
llib-lmakewhatis.ln: $(MAKEWHATIS_LNS)
$(LINT) $(LINTFLAGS) -Cmakewhatis $(MAKEWHATIS_LNS)
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-06-21 13:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-21 13:13 mdocml: Don't let empty strings into the makewhatis keyword database kristaps
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).