From 94266eee5015ab94c4561b85bc238e12233e56ae Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 25 Jun 2016 16:12:32 +0100 Subject: [PATCH] Replaced strcpy with more robust osgDB::stringcopyfixedsize() usage. --- src/osgPlugins/3ds/WriterNodeVisitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgPlugins/3ds/WriterNodeVisitor.cpp b/src/osgPlugins/3ds/WriterNodeVisitor.cpp index 64be397ad..12d49e82c 100644 --- a/src/osgPlugins/3ds/WriterNodeVisitor.cpp +++ b/src/osgPlugins/3ds/WriterNodeVisitor.cpp @@ -538,7 +538,7 @@ void WriterNodeVisitor::writeMaterials() } Lib3dsTextureMap & tex = mat3ds->texture1_map; - strcpy(tex.name, path.c_str()); + stringcopyfixedsize(tex.name, path.c_str()); // Here we don't assume anything about initial flags state (actually it is set to LIB3DS_TEXTURE_NO_TILE by lib3DS, but this is subject to change) if (mat.texture_transparency) tex.flags |= LIB3DS_TEXTURE_ALPHA_SOURCE; else tex.flags &= ~LIB3DS_TEXTURE_ALPHA_SOURCE;