summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2006-03-13 13:26:41 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2006-03-13 13:26:41 +0000
commit864f7a0ceb89bd28b842ec5e0d0ed6abf112be9c (patch)
treef30468f446dfdde7bc27bc6c82de67f227721b05 /misc.h
parentfc3a5e7e8f632112420df1d99f0d2080f19477d0 (diff)
downloadcryptopp-864f7a0ceb89bd28b842ec5e0d0ed6abf112be9c.tar.gz
fix MSVC 2005 warnings
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@217 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'misc.h')
-rw-r--r--misc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc.h b/misc.h
index ba77ac4..3b25ee0 100644
--- a/misc.h
+++ b/misc.h
@@ -355,7 +355,7 @@ inline void IncrementCounterByOne(byte *output, const byte *input, unsigned int
int i, carry;
for (i=s-1, carry=1; i>=0 && carry; i--)
carry = !(output[i] = input[i]+1);
- memcpy(output, input, i+1);
+ memcpy_s(output, s, input, i+1);
}
// ************** rotate functions ***************
@@ -602,7 +602,7 @@ inline void ConditionalByteReverse(ByteOrder order, T *out, const T *in, size_t
if (!NativeByteOrderIs(order))
ByteReverse(out, in, byteCount);
else if (in != out)
- memcpy(out, in, byteCount);
+ memcpy_s(out, byteCount, in, byteCount);
}
template <class T>
@@ -852,7 +852,7 @@ template <class T>
T StringToWord(const std::string &str, ByteOrder order = BIG_ENDIAN_ORDER)
{
T value = 0;
- memcpy(&value, str.data(), UnsignedMin(str.size(), sizeof(value)));
+ memcpy_s(&value, sizeof(value), str.data(), UnsignedMin(str.size(), sizeof(value)));
return NativeByteOrderIs(order) ? value : ByteReverse(value);
}