mirror of
https://github.com/anope/anope.git
synced 2026-06-30 00:16:39 +02:00
Use memcpy for Anope::Unhex not strcpy
This commit is contained in:
+1
-1
@@ -773,7 +773,7 @@ void Anope::Unhex(const Anope::string &src, char *dest, size_t sz)
|
||||
Anope::string d;
|
||||
Anope::Unhex(src, d);
|
||||
|
||||
strncpy(dest, d.c_str(), sz);
|
||||
memcpy(dest, d.c_str(), std::min(d.length() + 1, sz));
|
||||
}
|
||||
|
||||
int Anope::LastErrorCode()
|
||||
|
||||
Reference in New Issue
Block a user