Quipyowert2 / libKXL

Kacchan X Windows System Library (KXL) is a visual & sound library.
GNU General Public License v2.0
3 stars 0 forks source link

Fix fuzz test segfault when loading a bitmap fails. #9

Closed Quipyowert2 closed 1 year ago

Quipyowert2 commented 1 year ago

Fixes a segfault in the fuzz test when given a certain AFL++ generated bitmap file. Since _KXLLoadBitmap() can return NULL now, there needs to be a NULL check before calling _KXLDeleteImage(). On old versions of libKXL, the PXIpZM file would cause fuzz/sample to loop for a long time.

Also added another unit test, and missing newlines to a couple of error messages.