hicolor icon indicating copy to clipboard operation
hicolor copied to clipboard

Lack of PNG format verification

Open iosifache opened this issue 3 years ago • 2 comments

As the cute_png.h library is used to load and parse PNG files, the returned image is not verified. This could cause the program's functionality to be disrupted.

An example I encountered was when the PNG headers stored excessive values for the image's height and width (despite the fact that the pixels are not stored in the data section of the format). This causes the malloc from the function cp_to_rgb to return NULL and, as a result of the pointer dereferencing below, the program will generate a SIGSERV and stop working.

iosifache avatar Jan 17 '22 18:01 iosifache

how did you get this software to work.

ghost avatar Feb 04 '22 14:02 ghost

@tax-evasion6967, just following the README.md for building the executable on Linux and running it.

iosifache avatar Feb 05 '22 07:02 iosifache

https://github.com/RandyGaul/cute_headers/issues/335

dbohdan avatar Jan 01 '23 11:01 dbohdan