From 449900dc47f6b378501ecca64be27abb756864b2 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Fri, 14 Jul 2023 18:29:41 +0900 Subject: [PATCH] Fix coverity issue Change-Id: I162997b9d8841fe11d85545b87c63fbfbfce9ca7 --- .../internal/particle-system/particle-renderer-impl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dali-toolkit/internal/particle-system/particle-renderer-impl.cpp b/dali-toolkit/internal/particle-system/particle-renderer-impl.cpp index b9e689fbe3..87eefa5a24 100644 --- a/dali-toolkit/internal/particle-system/particle-renderer-impl.cpp +++ b/dali-toolkit/internal/particle-system/particle-renderer-impl.cpp @@ -98,11 +98,11 @@ void ParticleRenderer::CreateShader() char key[256]; if(streamName.empty()) { - sprintf(key, "aStreamAttr_%d", i); + snprintf(key, sizeof(key), "aStreamAttr_%d", i); } else { - sprintf(key, "%s", streamName.c_str()); + snprintf(key, sizeof(key), "%s", streamName.c_str()); } streamAtttributes.Add(key, ATTR_TYPES[dataTypeIndex]); @@ -462,4 +462,4 @@ void ParticleRenderer::PrepareToDie() } } -} // namespace Dali::Toolkit::ParticleSystem::Internal \ No newline at end of file +} // namespace Dali::Toolkit::ParticleSystem::Internal -- 2.34.1