#1067022 man2html: Segmentation fault with tzfile(5)

Package:
man2html
Source:
man2html
Description:
browse man pages in your web browser
Submitter:
Alejandro Colomar
Date:
2024-03-18 04:42:04 UTC
Severity:
normal
Tags:
#1067022#5
Date:
2024-03-16 23:06:38 UTC
From:
To:
Dear Maintainer,

The page tzfile(5) from tzdb-2024a manages to consistently produce a
Segmentation fault with man2html(1).  Below is a reproducer:

	alx@debian:~/tmp$ wget https://data.iana.org/time-zones/releases/tzdb-2024a.tar.lz 2>/dev/null
	alx@debian:~/tmp$ tar xf tzdb-2024a.tar.lz
	alx@debian:~/tmp$ man2html tzdb-2024a/tzfile.5
	Content-type: text/html; charset=UTF-8

	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
	<HTML><HEAD><TITLE>Man page of tzfile</TITLE>
	</HEAD><BODY>
	<H1>tzfile</H1>
	Section: File Formats (5)<BR>Updated: <BR><A HREF="#index">Index</A>
	<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>

	<A NAME="lbAB"> </A>
	<H2>NAME</H2>

	tzfile - timezone information
	<A NAME="lbAC"> </A>
	<H2>DESCRIPTION</H2>









	The timezone information files used by
	<B><A HREF="/cgi-bin/man/man2html?3+tzset">tzset</A></B>(3)

	are typically found under a directory with a name like
	<I>/usr/share/zoneinfo</I>.

	These files use the format described in Internet RFC 8536.
	Each file is a sequence of 8-bit bytes.
	In a file, a binary integer is represented by a sequence of one or
	more bytes in network order (bigendian, or high-order byte first),
	with all bits significant,
	a signed binary integer is represented using two's complement,
	and a boolean is represented by a one-byte binary integer that is
	either 0 (false) or 1 (true).
	The format begins with a 44-byte header containing the following fields:
	Segmentation fault
	alx@debian:~/tmp$ dpkg -l | grep man2html
	ii  man2html                                       1.6g-16                                   amd64        browse man pages in your web browser
	ii  man2html-base                                  1.6g-16                                   amd64        convert man pages into HTML format

I've refreshed this page today, and the previous version I used didn't
have this crash.  Below is the part of the diff that I think is
responsible for the crash:

	diff --git a/man5/tzfile.5 b/man5/tzfile.5
	index 45afecc10..867348d67 100644
	--- a/man5/tzfile.5
	+++ b/man5/tzfile.5
	@@ -26,23 +26,24 @@ .SH DESCRIPTION
	 and a boolean is represented by a one-byte binary integer that is
	 either 0 (false) or 1 (true).
	 The format begins with a 44-byte header containing the following fields:
	-.IP * 2
	+.RS "\w'  'u"
	+.IP \(bu "\w'\(bu  'u"
	 The magic four-byte ASCII sequence
	 .q "TZif"
	 identifies the file as a timezone information file.

BTW, I noticed that the upstream homepage is dead:
<http://users.actrix.gen.nz/michael/vhman2html.html>.
Is this project defunct?

Have a lovely day!
Alex

#1067022#10
Date:
2024-03-18 04:31:54 UTC
From:
To:
Yes it is. It's been defunct for many years.

Attached is a patch for this particular bug. However, a brief code
inspection suggests there are lots more core dumps where this came from.

man2html should be discontinued from Debian if nobody wants to maintain
it, as I don't. There are plenty of substitutes for it, starting with
groff itself.

#1067022#15
Date:
2024-03-18 04:31:54 UTC
From:
To:
Yes it is. It's been defunct for many years.

Attached is a patch for this particular bug. However, a brief code
inspection suggests there are lots more core dumps where this came from.

man2html should be discontinued from Debian if nobody wants to maintain
it, as I don't. There are plenty of substitutes for it, starting with
groff itself.