From 25f0146f44c454c2decbd9146329db9921b4f937 Mon Sep 17 00:00:00 2001 From: sfjohnston Date: Wed, 28 Dec 2022 12:32:11 -0800 Subject: [PATCH] sprintf to snprintf with known MAXLEN for buffer. --- test/unit/utPretransformVertices.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/utPretransformVertices.cpp b/test/unit/utPretransformVertices.cpp index b22fdf71f..b3ae818bc 100644 --- a/test/unit/utPretransformVertices.cpp +++ b/test/unit/utPretransformVertices.cpp @@ -68,7 +68,7 @@ void AddNodes(unsigned int num, aiNode *father, unsigned int depth) { for (unsigned int i = 0; i < 5; ++i) { aiNode *nd = father->mChildren[i] = new aiNode(); - nd->mName.length = sprintf(nd->mName.data, "%i%i", depth, i); + nd->mName.length = snprintf(nd->mName.data, MAXLEN, "%i%i", depth, i); // spawn two meshes nd->mMeshes = new unsigned int[nd->mNumMeshes = 2];