You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
man2html/SOURCES/man2html-noindex-segfault.p...

25 lines
842 B

Fix segfault on man pages with no sections (see bug #349907).
diff -ruN -x config.guess -x config.sub man-1.6e-old/man2html/man2html.c man-1.6e/man2html/man2html.c
--- man-1.6e-old/man2html/man2html.c 2007-01-31 01:30:17.000000000 +0100
+++ man-1.6e/man2html/man2html.c 2007-01-31 01:30:18.000000000 +0100
@@ -3256,11 +3256,13 @@
out_html(NEWLINE);
if (output_possible) {
/*   for mosaic users */
- printf("<HR>\n<A NAME=\"index\">&nbsp;</A><H2>Index</H2>\n<DL>\n");
- manidx[mip]=0;
- printf("%s", manidx);
- if (subs) printf("</DL>\n");
- printf("</DL>\n");
+ if (manidx) {
+ printf("<HR>\n<A NAME=\"index\">&nbsp;</A><H2>Index</H2>\n<DL>\n");
+ manidx[mip]=0;
+ printf("%s", manidx);
+ if (subs) printf("</DL>\n");
+ printf("</DL>\n");
+ }
print_sig();
printf("</BODY>\n</HTML>\n");
} else {