CImg through 2.6.7 has a heap-based buffer overflow in _load_bmp in CImg.h because of erroneous memory allocation for a malformed BMP image.
https://github.com/dtschump/CImg/commit/ac8003393569aba51048c9d67e1491559877b1d1
https://github.com/dtschump/CImg