Added security checks #3924

This commit is contained in:
Ray 2024-04-20 13:50:34 +02:00
parent a17a81f05b
commit 2754c80596

View file

@ -457,6 +457,9 @@ Image LoadImageAnimFromMemory(const char *fileType, const unsigned char *fileDat
{
Image image = { 0 };
int frameCount = 0;
// Security check for input data
if ((fileType == NULL) || (fileData == NULL) || (dataSize == 0)) return image;
#if defined(SUPPORT_FILEFORMAT_GIF)
if ((strcmp(fileType, ".gif") == 0) || (strcmp(fileType, ".GIF") == 0))