aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/armnn/LayerSupport.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/armnn/LayerSupport.cpp b/src/armnn/LayerSupport.cpp
index 5324e5f2fe..1d9d249024 100644
--- a/src/armnn/LayerSupport.cpp
+++ b/src/armnn/LayerSupport.cpp
@@ -24,10 +24,7 @@ void CopyErrorMessage(char* truncatedString, const char* fullString, size_t maxL
{
if(truncatedString != nullptr)
{
- size_t copyLength = std::min(maxLength, strlen(fullString));
- std::strncpy(truncatedString, fullString, copyLength);
- // Ensure null-terminated string.
- truncatedString[copyLength] = '\0';
+ std::snprintf(truncatedString, maxLength, "%s", fullString);
}
}