2016-12-16 10:45:04 +01:00
|
|
|
---
|
|
|
|
src/man.c | 8 ++++----
|
|
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
|
2010-05-03 23:01:53 +02:00
|
|
|
--- src/man.c
|
2018-11-26 12:53:50 +01:00
|
|
|
+++ src/man.c 2018-11-23 12:42:32.280720195 +0000
|
|
|
|
@@ -978,7 +978,7 @@ static const char *is_section (const cha
|
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 */
|
2018-11-26 12:53:50 +01:00
|
|
|
@@ -2776,7 +2776,7 @@ static int compare_candidates (const str
|
2012-10-02 19:06:04 +02:00
|
|
|
/* Find out whether lsource->ext is ahead of rsource->ext in
|
2006-12-19 00:17:06 +01:00
|
|
|
* section_list.
|
|
|
|
*/
|
|
|
|
- for (sp = section_list; *sp; ++sp) {
|
|
|
|
+ for (sp = section_list; sp && *sp; ++sp) {
|
|
|
|
if (!*(*sp + 1)) {
|
|
|
|
/* No extension */
|
2012-10-02 19:06:04 +02:00
|
|
|
if (!sec_left && **sp == *(lsource->ext))
|
2018-11-26 12:53:50 +01:00
|
|
|
@@ -3738,7 +3738,7 @@ static int do_global_apropos (const char
|
2016-12-16 10:45:04 +01:00
|
|
|
} else
|
|
|
|
my_section_list = section_list;
|
|
|
|
|
|
|
|
- for (sp = my_section_list; *sp; sp++)
|
|
|
|
+ for (sp = my_section_list; sp && *sp; sp++)
|
|
|
|
for (mp = manpathlist; *mp; mp++)
|
|
|
|
*found += do_global_apropos_section (*mp, *sp, name);
|
|
|
|
|
2018-11-26 12:53:50 +01:00
|
|
|
@@ -3927,7 +3927,7 @@ static int man (const char *name, int *f
|
2016-12-16 10:45:04 +01:00
|
|
|
else {
|
2006-12-19 00:17:06 +01:00
|
|
|
const char **sp;
|
|
|
|
|
|
|
|
- for (sp = section_list; *sp; sp++) {
|
|
|
|
+ for (sp = section_list; sp && *sp; sp++) {
|
2016-12-16 10:45:04 +01:00
|
|
|
locate_page_in_manpath (*sp, name, &candidates, found);
|
|
|
|
}
|
|
|
|
}
|