Fix coverity issue
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / particle-system / particle-renderer-impl.cpp
index b9e689f..87eefa5 100644 (file)
@@ -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