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

A memleak bug of png2swf. #48

Open
ghost opened this issue Nov 10, 2017 · 0 comments
Open

A memleak bug of png2swf. #48

ghost opened this issue Nov 10, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Nov 10, 2017

A memleak bug of png2swf.
poc1: https://drive.google.com/open?id=1MUuOab8EYCwhDUH9cC5DwSuF_slthBPd
asan1: https://drive.google.com/open?id=1h-w58olMDSpXohrNGDk-hLGEQjwhKDiO
poc2: https://drive.google.com/open?id=1QUpPmR9KQPWPsMVakzWhqgB8t0WQGW5f
asan2: https://drive.google.com/open?id=1jSFnQFLiiDPXVXZnYQZ7pRaK0g8PZJL7

https://github.com/matthiaskramm/swftools/blob/54657f9ba3dd4fa3e54c8f8c18f3def7a42d1f1c/lib/png.c#L517

In fuction png_load: when cmp with PLTE and tRNS, the data which is alloc is saved on palette/alphapalette, but not free, which can cause a memleak bug.

patch: free it

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

0 participants