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
1 changed files with 1 additions and 1 deletions

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;