rkd77 / elinks

Fork of elinks
Other
335 stars 35 forks source link

Abort: malloc(): invalid size (unsorted) #214

Open etoddallen opened 1 year ago

etoddallen commented 1 year ago

The tool aborts with a malloc error on the attached HTML. The HTML originally was an actual email I received, but it contained some confidential information, so I had to edit it down to what I've attached. It originally was the result of many replies and replies-to-replies, etc., so it is heavily idented. Which I think is part of what's driving elinks crazy.

The original failure was with the RHEL9 elinks-0.16.0-3.el9.x86_64 package, but I confirmed that it also fails when built from git commit d9d5633c0b8f8f300d3844980c08372bafad71e1.

Anyway, he actual failure is:

$ src/elinks -dump elinks-boom.html.txt malloc(): invalid size (unsorted) Abort(coredump)

elinks-boom.html.txt

rkd77 commented 1 year ago

Thanks for the report. Please check above commit.

etoddallen commented 1 year ago

Thanks. It fixes the memory fault, so much better! Now I can see the recent replies in the email chain, including in the original.

I will point out that the problematic very-indented table is displayed strangely, with the table boundaries being out-dented, and many characters overwritten with > characters:

+-->>>>>>>>>>>>> --------------------------------------------------------------- | >>>|>>>>>>>>> s, | >>>|>>>>>>>>> ...

rkd77 commented 1 year ago

Sorry, I have no idea yet how to resolve it.

etoddallen commented 1 year ago

OK. The malloc failure definitely was the Big Bad, and that's fixed.