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/Address.hpp | |
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/Address.hpp')
-rw-r--r-- | node/Address.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/node/Address.hpp b/node/Address.hpp index 8baf9dbe..805c439d 100644 --- a/node/Address.hpp +++ b/node/Address.hpp @@ -32,7 +32,9 @@ #include <stdlib.h> #include <stdint.h> #include <string.h> + #include <string> + #include "Utils.hpp" #include "MAC.hpp" #include "Constants.hpp" @@ -198,7 +200,7 @@ public: inline std::string toString() const { char buf[16]; - sprintf(buf,"%.10llx",(unsigned long long)_a); + Utils::snprintf(buf,sizeof(buf),"%.10llx",(unsigned long long)_a); return std::string(buf); }; |