Adds log warnings on invalid file data

This commit is contained in:
Jutastre 2024-07-24 19:19:56 +02:00
parent bbcb0109e1
commit 7c79950a95

View File

@ -503,7 +503,11 @@ Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, i
Image image = { 0 };
// Security check for input data
if ((fileType == NULL) || (fileData == NULL) || (dataSize == 0)) return image;
if ((fileType == NULL) || (fileData == NULL) || (dataSize == 0))
{
TRACELOG(LOG_ERROR, "IMAGE: Invalid file data");
return image;
}
if ((false)
#if defined(SUPPORT_FILEFORMAT_PNG)