Hey there,

On Sat, 28 May 2011 11:40:58 +0300 "Eugene V. Lyubimkin"
<[email protected]> wrote:
> Hi Martin,
>
> On 2011-05-27 18:15, Martin Dorey wrote:
> > Package: html2text
> > Version: 1.3.2a-5
> > Severity: normal
> >
> > Nowhere in the man page does it suggest that -width -1 is legal, so why am 
> > I using it?
> > Well, it seemed to work for me in one application, and saved my having to 
> > pick a magic number.
> > After all, html2text didn't say it was a usage error.
> > Then came another application and html2text crashed, having produced glibc 
> > heap corruption output.
> > After reducing the HTML to a minimal file, I see that html2text is trying 
> > to malloc for a width of -1.
> > On my amd64 system, that's been sign-extended to more memory than I have.
> > I wonder if html2text should refuse the argument, cap it at a sane value or 
> > just report the malloc failure in a more revealing way.
> [...]
>
> Thanks for your report.
>
> Html2text has no upstream, and a Debian package of it needs new
> maintainer. It's unlikely that this will be fixed until someone steps
> up.

Here's a simple patch fixing this, by ignoring width values under 1:

https://github.com/marado/html2text/commit/3f2a9d54dd7919f097214a796815ed105bec2e69

Best regards,
-- 
Marcos Marado


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to