Menu

#161 Two patch fix out of bounds.

open
nobody
None
5
2023-10-13
2023-10-13
No

Here are two patches might help fix memory access out of bounds.

  1. The mChunk buffer size is not checked before reading the mng image, add boundary check, avoid accessing illegal addresses.
    Reproduce the error by FreeImage_Load(FIF_MNG, "./crash.mng");

  2. Fix ReadColorTable() may access out-of-bounds. The maximum length of input pPal is 256, limit the number of colors allowed.
    Reproduce the error by FreeImage_Load(FIF_PICT, "./crash.pict");

4 Attachments

Discussion

Anonymous
Anonymous

Add attachments
Cancel