Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'table cellpadding' consums lots of memory #11

Closed
kcwu opened this issue Aug 16, 2016 · 1 comment
Closed

'table cellpadding' consums lots of memory #11

kcwu opened this issue Aug 16, 2016 · 1 comment

Comments

@kcwu
Copy link
Contributor

kcwu commented Aug 16, 2016

echo '<table cellpadding=1070000000>0</table>' | ./w3m -T text/html -dump

this needs more than 1GB memory. Although w3m can finish render, I am wondering should w3m really need to allocate such amount of memory? maybe truncate the number instead?

echo '<table cellpadding=40700000000 border>0' | ./w3m -T text/html -dump

This needs more than 4GB and failed with following message:

GC Warning: Out of Memory! Heap size: 4539 MiB. Returning NULL!
Out of memory: 18446744073314787007 bytes unavailable!

18446744073314787007 looks like integer overflow?

My machine is 64bit ubuntu 14.04. w3m was compiled with default gcc.

This is found with afl-fuzz.

tats added a commit that referenced this issue Aug 16, 2016
@tats
Copy link
Owner

tats commented Aug 16, 2016

Fixed, thank you.

@tats tats closed this as completed Aug 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants