diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-08-30 17:05:43 -0400 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-08-30 17:05:43 -0400 |
| commit | f3ad05347e55de2fd2a500464acde0979df9941f (patch) | |
| tree | 57376b3114e193201dcfe2d08ef2a5bdb693ad30 /node/Network.cpp | |
| parent | 1a7e303f97507842c1a0bfffb27b76277bd43bab (diff) | |
| download | infinitytier-f3ad05347e55de2fd2a500464acde0979df9941f.tar.gz infinitytier-f3ad05347e55de2fd2a500464acde0979df9941f.zip | |
Improve code security posture by replacing sprintf with a safer function.
Diffstat (limited to 'node/Network.cpp')
| -rw-r--r-- | node/Network.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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> 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 |
