diff options
author | Adam <Adam@anope.org> | 2012-10-05 01:20:32 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-10-05 01:20:32 -0400 |
commit | 7c96227cd3dd9c562fb382a9af62e451846328fa (patch) | |
tree | a43afc4155252b0cb48415572fbf6d878980cccb /src | |
parent | dcfae6332e9b4ba86d8fc7396c63a2176c551dae (diff) |
Use memcpy for Anope::Unhex not strcpy
Diffstat (limited to 'src')
-rw-r--r-- | src/misc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc.cpp b/src/misc.cpp index 1245656f0..cd7516b76 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -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() |