From 1d75723faca5df24b405fc3ded50fccea4faee71 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Thu, 3 Jan 2019 09:34:11 -0500 Subject: Use memcpy instead of strcpy here to shut up MSVC warning Here the caller is assumed to have provided a buffer of sufficient size. --- src/lib/ffi/ffi_mp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/ffi/ffi_mp.cpp') diff --git a/src/lib/ffi/ffi_mp.cpp b/src/lib/ffi/ffi_mp.cpp index d9b41cb52..be94a2c3d 100644 --- a/src/lib/ffi/ffi_mp.cpp +++ b/src/lib/ffi/ffi_mp.cpp @@ -100,7 +100,7 @@ int botan_mp_to_hex(const botan_mp_t mp, char* out) { return BOTAN_FFI_DO(Botan::BigInt, mp, bn, { const std::string hex = bn.to_hex_string(); - std::strcpy(out, hex.c_str()); + std::memcpy(out, hex.c_str(), 1 + hex.size()); }); } -- cgit v1.2.3