1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 12:33:52 +00:00

Fix possible overflow in modelData texture path;

This commit is contained in:
bjorn 2018-09-26 23:16:18 -07:00
parent 05802f3e90
commit 56fa853b09

View file

@ -167,7 +167,7 @@ static int readMaterialTexture(struct aiMaterial* assimpMaterial, enum aiTexture
char* lastSlash = strrchr(fullPath, '/');
if (lastSlash) lastSlash[1] = '\0';
else fullPath[0] = '\0';
strncat(fullPath, path, LOVR_PATH_MAX);
strncat(fullPath, path, LOVR_PATH_MAX - 1);
normalizePath(fullPath, normalizedPath, LOVR_PATH_MAX);
size_t size;