16 lines
579 B
Diff
16 lines
579 B
Diff
|
diff --git a/src/armnn/LayerSupport.cpp b/src/armnn/LayerSupport.cpp
|
||
|
--- a/src/armnn/LayerSupport.cpp
|
||
|
+++ b/src/armnn/LayerSupport.cpp
|
||
|
@@ -26,10 +26,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, fullString);
|
||
|
}
|
||
|
}
|
||
|
|