Module Name: src
Committed By: riz
Date: Fri Feb 8 19:45:44 UTC 2013
Modified Files:
src/usr.sbin/makemandb [netbsd-6]: makemandb.c
Log Message:
Pull up following revision(s) (requested by christos in ticket #786):
usr.sbin/makemandb/makemandb.c: revision 1.16
If you cannot parse .SH NAME, like in the case of the ksh93 man page
where the .SH is followed by a conditional:
.SH NAME
.if \nZ=0 \{text text text
.\}
at least don't core-dump.
To generate a diff of this commit:
cvs rdiff -u -r1.2.2.6 -r1.2.2.7 src/usr.sbin/makemandb/makemandb.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/makemandb/makemandb.c
diff -u src/usr.sbin/makemandb/makemandb.c:1.2.2.6 src/usr.sbin/makemandb/makemandb.c:1.2.2.7
--- src/usr.sbin/makemandb/makemandb.c:1.2.2.6 Tue Nov 20 23:11:47 2012
+++ src/usr.sbin/makemandb/makemandb.c Fri Feb 8 19:45:43 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: makemandb.c,v 1.2.2.6 2012/11/20 23:11:47 riz Exp $ */
+/* $NetBSD: makemandb.c,v 1.2.2.7 2013/02/08 19:45:43 riz Exp $ */
/*
* Copyright (c) 2011 Abhinav Upadhyay <[email protected]>
* Copyright (c) 2011 Kristaps Dzonsons <[email protected]>
@@ -17,7 +17,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: makemandb.c,v 1.2.2.6 2012/11/20 23:11:47 riz Exp $");
+__RCSID("$NetBSD: makemandb.c,v 1.2.2.7 2013/02/08 19:45:43 riz Exp $");
#include <sys/stat.h>
#include <sys/types.h>
@@ -1273,6 +1273,8 @@ pman_sh(const struct man_node *n, mandb_
pman_parse_name(n, rec);
name_desc = rec->name_desc;
+ if (name_desc == NULL)
+ return;
/* Remove any leading spaces. */
while (name_desc[0] == ' ')