commit | 4d4fc5ca5ee4faae5dc4237f801d9527a3fb20cc | [log] [tgz] |
---|---|---|
author | Denys Vlasenko <vda.linux@googlemail.com> | Tue Jun 15 14:47:46 2021 +0200 |
committer | Denys Vlasenko <vda.linux@googlemail.com> | Tue Jun 15 14:47:46 2021 +0200 |
tree | 481023d6664b0635b16885205bc25ff957af3523 | |
parent | e47000490c30109db1d571bcab12f385cd0139e5 [diff] |
man: fix segfault in "man 1" function old new delta man_main 942 954 +12 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/miscutils/man.c b/miscutils/man.c index 722f664..d319e8b 100644 --- a/miscutils/man.c +++ b/miscutils/man.c
@@ -324,7 +324,7 @@ /* is 1st ARG a SECTION? */ sec_list = conf_sec_list; - if (is_section_name(conf_sec_list, *argv)) { + if (is_section_name(conf_sec_list, *argv) && argv[1]) { /* yes */ sec_list = *argv++; }