From f3ad05347e55de2fd2a500464acde0979df9941f Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 30 Aug 2013 17:05:43 -0400 Subject: Improve code security posture by replacing sprintf with a safer function. --- node/Network.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'node/Network.cpp') diff --git a/node/Network.cpp b/node/Network.cpp index fc52e6d7..b66cc3b5 100644 --- a/node/Network.cpp +++ b/node/Network.cpp @@ -140,7 +140,7 @@ SharedPtr Network::newInstance(const RuntimeEnvironment *renv,uint64_t throw(std::runtime_error) { char tag[32]; - sprintf(tag,"%.16llx",(unsigned long long)id); + Utils::snprintf(tag,sizeof(tag),"%.16llx",(unsigned long long)id); // We construct Network via a static method to ensure that it is immediately // wrapped in a SharedPtr<>. Otherwise if there is traffic on the Ethernet -- cgit v1.2.3