mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-04 13:33:34 +00:00
Fix possible overflow in modelData texture path;
This commit is contained in:
parent
05802f3e90
commit
56fa853b09
|
@ -167,7 +167,7 @@ static int readMaterialTexture(struct aiMaterial* assimpMaterial, enum aiTexture
|
||||||
char* lastSlash = strrchr(fullPath, '/');
|
char* lastSlash = strrchr(fullPath, '/');
|
||||||
if (lastSlash) lastSlash[1] = '\0';
|
if (lastSlash) lastSlash[1] = '\0';
|
||||||
else fullPath[0] = '\0';
|
else fullPath[0] = '\0';
|
||||||
strncat(fullPath, path, LOVR_PATH_MAX);
|
strncat(fullPath, path, LOVR_PATH_MAX - 1);
|
||||||
normalizePath(fullPath, normalizedPath, LOVR_PATH_MAX);
|
normalizePath(fullPath, normalizedPath, LOVR_PATH_MAX);
|
||||||
|
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
Loading…
Reference in a new issue