#1452·stb

NULL pointer dereference in the stb_image.h

Author: 0xdd96Created Feb 21, 2023Updated Sep 29, 2026
Labels2 bug1 stb_image

I discovered a null pointer dereference vulnerability in the stb_image.h of libsixel, which also exists in this project.

Specifically, if the stbi__pic_load_core function returns 0 (line 6528), result will be released (line 6529) and set to 0 (line 6530). This null pointer will be dereferenced in stbi__convert_format, which would crash the application.

https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_image.h#L6523-L6535