2009-12-14 00:07:51 +01:00
|
|
|
Index: src/man.c
|
|
|
|
===================================================================
|
|
|
|
--- src/man.c.orig
|
|
|
|
+++ src/man.c
|
|
|
|
@@ -1142,7 +1142,7 @@ static inline const char *is_section (co
|
2006-12-19 00:17:06 +01:00
|
|
|
{
|
|
|
|
const char **vs;
|
|
|
|
|
|
|
|
- for (vs = section_list; *vs; vs++) {
|
|
|
|
+ for (vs = section_list; vs && *vs; vs++) {
|
|
|
|
if (STREQ (*vs, name))
|
|
|
|
return name;
|
2009-12-14 00:07:51 +01:00
|
|
|
/* allow e.g. 3perl but disallow 8139too and libfoo */
|
|
|
|
@@ -2565,7 +2565,8 @@ static int compare_candidates (const str
|
2006-12-19 00:17:06 +01:00
|
|
|
* section_list.
|
|
|
|
*/
|
|
|
|
const char **sp;
|
|
|
|
- for (sp = section_list; *sp; ++sp) {
|
|
|
|
+
|
|
|
|
+ for (sp = section_list; sp && *sp; ++sp) {
|
|
|
|
if (!*(*sp + 1)) {
|
|
|
|
/* No extension */
|
|
|
|
if (!sec_left && **sp == *(left->ext))
|
2009-12-14 00:07:51 +01:00
|
|
|
@@ -3209,7 +3210,7 @@ static int man (const char *name, int *f
|
2006-12-19 00:17:06 +01:00
|
|
|
} else {
|
|
|
|
const char **sp;
|
|
|
|
|
|
|
|
- for (sp = section_list; *sp; sp++) {
|
|
|
|
+ for (sp = section_list; sp && *sp; sp++) {
|
|
|
|
char **mp;
|
|
|
|
|
|
|
|
for (mp = manpathlist; *mp; mp++)
|