diff options
author | Jack Lloyd <[email protected]> | 2019-01-03 09:34:11 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-01-03 09:34:11 -0500 |
commit | 1d75723faca5df24b405fc3ded50fccea4faee71 (patch) | |
tree | 71a4ae3a60e2d6c2a9301946bd93219733194b45 /src/lib/ffi | |
parent | 8deddb4da07bfb901b90860bdf67f8dd84e05ec3 (diff) |
Use memcpy instead of strcpy here to shut up MSVC warning
Here the caller is assumed to have provided a buffer of sufficient size.
Diffstat (limited to 'src/lib/ffi')
-rw-r--r-- | src/lib/ffi/ffi_mp.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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()); }); } |