http://www.mbayer.de/html2text/issues.shtml The problem is in the usage of get_attribute, which is a variable argument function. The function checks for a NULL (char *) argument to terminate processing. Callers used 0 to represent the end of the list, which fails on architectures where int is not the same length as (char *). Callers should use NULL when they mean NULL. C++ blurs the difference between 0 and NULL much more than C. In a variable argument function call, there is still a difference. Larry Doolittle very kindly wrote a a patch that fixes this. It can be found in the program's downloads directory. Reproducible: Always Steps to Reproduce: 1.emerge =app-text/html2text-1.3.2a 2.wget http://www.dayid.org/os/notes/tm.html -O /tmp/input 3.html2text < /tmp/center.div.justified.td.htm Actual Results: Segmentation fault Expected Results: formatted text. Relevant for some 1990's era html-layout practices.
Created attachment 391150 [details] gcc 4.7
Created attachment 391152 [details] /tmp/bug/center.div.justified.td.htm This input causes a segmentation fault for me. Original document from http://www.dayid.org/os/notes/tm.html
Created attachment 391154 [details] [failure] =app-text/html2text-1.3.2a
Created attachment 391156 [details] [success] =app-text/html2text-1.3.2a-r1
Created attachment 391160 [details, diff] html2text-1.3.2.ebuild.patch Easy fix with upstream patch.
Please consider applying the submitted ebuild patch.
+*html2text-1.3.2a-r1 (23 Apr 2015) + + 23 Apr 2015; Sergey Popov <pinkbyte@gentoo.org> +html2text-1.3.2a-r1.ebuild, + metadata.xml: + Revision bump: EAPI 5, epatch_user, fix segmentation fault, wrt bug #531910. + Package will be maintained by Jaroslav Rakhmatoullin <jazzoslav AT gmail.com> + via proxy maintainers