jugglerchris/rust-html2text

certain pages cause memory allocation failure

Closed this issue · 4 comments

version: 0.12.5
a sample url to reproduce issue: https://docs.stripe.com/refunds
simply call html2text::from_read_with_decorator(cursor, 100, TrivialDecorator::new()); cause a memory allocation of 216172782113783784 bytes failed error and crashes the program on MacOS

Thanks for the report! It still happens with the 0.13 alphas (and current HEAD).
I've had an initial look - that page has a colspan with a crazy high nonsensical value, but of course we shouldn't be panicking!
It'll take a few days to fix (busy life stuff), but I'm on the case.

The fix is merged, thanks again - I hope to publish a new release in the next few days.

Thanks for the fix - is a new release happening soon? Thanks

Hi - 0.13.x isn't quite ready yet, but I've cherry-picked this and a couple of other fixes and just published 0.12.6. Sorry for the wait, and let me know if you have any issues with it!