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

Multiple divide-by-zero sites potentially causing crashes #144

Open
dns43 opened this issue Jan 31, 2021 · 0 comments
Open

Multiple divide-by-zero sites potentially causing crashes #144

dns43 opened this issue Jan 31, 2021 · 0 comments

Comments

@dns43
Copy link

dns43 commented Jan 31, 2021

In lodepng_deflatev(), getPixelColorsRGBA8() and lodepng_convert_rgb(), divide by zero can be triggered via bitdepth and input size. Please check if greater than 0 before usage.

LOC enumaration:
https://sourcegraph.com/github.com/lvandeve/lodepng@master/-/blob/lodepng.cpp#L3271
https://sourcegraph.com/github.com/lvandeve/lodepng@master/-/blob/lodepng.cpp#L3355
https://sourcegraph.com/github.com/lvandeve/lodepng@master/-/blob/lodepng.cpp#L3443:17
https://sourcegraph.com/github.com/lvandeve/lodepng@master/-/blob/lodepng.cpp#L3610
https://sourcegraph.com/github.com/lvandeve/lodepng@7fdcc96a5e5864eee72911c3ca79b1d9f0d12292/-/blob/lodepng.cpp#L2093

Happy to provide PoC

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

1 participant