diff options
| author | Ray <[email protected]> | 2024-04-20 13:50:34 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2024-04-20 13:50:34 +0200 |
| commit | 2754c80596eda7b322ba0ce8bd33c0e130ee5cbb (patch) | |
| tree | 176089c244f43f6bddbff5df5a03f882a3b6e408 /src | |
| parent | a17a81f05b62d92af1bff103721d17a180aa84e5 (diff) | |
| download | raylib-2754c80596eda7b322ba0ce8bd33c0e130ee5cbb.tar.gz raylib-2754c80596eda7b322ba0ce8bd33c0e130ee5cbb.zip | |
Added security checks #3924
Diffstat (limited to 'src')
| -rw-r--r-- | src/rtextures.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rtextures.c b/src/rtextures.c index 8abcb453..c82232d8 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -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)) |
