Adds log warnings on invalid file data
This commit is contained in:
parent
bbcb0109e1
commit
7c79950a95
|
|
@ -503,7 +503,11 @@ Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, i
|
||||||
Image image = { 0 };
|
Image image = { 0 };
|
||||||
|
|
||||||
// Security check for input data
|
// 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 ((false)
|
||||||
#if defined(SUPPORT_FILEFORMAT_PNG)
|
#if defined(SUPPORT_FILEFORMAT_PNG)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user