mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-17 22:58:22 +00:00
Improve code security posture by replacing sprintf with a safer function.
This commit is contained in:
@ -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);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user