summaryrefslogtreecommitdiff
path: root/node/MulticastGroup.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-08-30 17:05:43 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-08-30 17:05:43 -0400
commitf3ad05347e55de2fd2a500464acde0979df9941f (patch)
tree57376b3114e193201dcfe2d08ef2a5bdb693ad30 /node/MulticastGroup.hpp
parent1a7e303f97507842c1a0bfffb27b76277bd43bab (diff)
downloadinfinitytier-f3ad05347e55de2fd2a500464acde0979df9941f.tar.gz
infinitytier-f3ad05347e55de2fd2a500464acde0979df9941f.zip
Improve code security posture by replacing sprintf with a safer function.
Diffstat (limited to 'node/MulticastGroup.hpp')
-rw-r--r--node/MulticastGroup.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/node/MulticastGroup.hpp b/node/MulticastGroup.hpp
index 3c654ea2..9f2b111d 100644
--- a/node/MulticastGroup.hpp
+++ b/node/MulticastGroup.hpp
@@ -106,7 +106,7 @@ public:
inline std::string toString() const
{
char buf[64];
- sprintf(buf,"%.2x:%.2x:%.2x:%.2x:%.2x:%.2x/%.8lx",(unsigned int)_mac.data[0],(unsigned int)_mac.data[1],(unsigned int)_mac.data[2],(unsigned int)_mac.data[3],(unsigned int)_mac.data[4],(unsigned int)_mac.data[5],(unsigned long)_adi);
+ Utils::snprintf(buf,sizeof(buf),"%.2x:%.2x:%.2x:%.2x:%.2x:%.2x/%.8lx",(unsigned int)_mac.data[0],(unsigned int)_mac.data[1],(unsigned int)_mac.data[2],(unsigned int)_mac.data[3],(unsigned int)_mac.data[4],(unsigned int)_mac.data[5],(unsigned long)_adi);
return std::string(buf);
}