diff options
author | John Salem <josalem@microsoft.com> | 2020-02-12 18:14:46 -0800 |
---|---|---|
committer | Gleb Balykov <g.balykov@samsung.com> | 2020-03-25 15:29:41 +0300 |
commit | 704aff08762448cf0df22f2517b0b9fca6405623 (patch) | |
tree | 5869449a9cd0859dc8e1a4684a95bec1cf18bb3d /src | |
parent | 4ea577852d4134d44518a2b36cef81a173a2c947 (diff) | |
download | coreclr-704aff08762448cf0df22f2517b0b9fca6405623.tar.gz coreclr-704aff08762448cf0df22f2517b0b9fca6405623.tar.bz2 coreclr-704aff08762448cf0df22f2517b0b9fca6405623.zip |
modify integral tryparse to use memcpy (#2295)
Diffstat (limited to 'src')
-rw-r--r-- | src/vm/diagnosticsprotocol.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vm/diagnosticsprotocol.h b/src/vm/diagnosticsprotocol.h index 657e669033..4669813acc 100644 --- a/src/vm/diagnosticsprotocol.h +++ b/src/vm/diagnosticsprotocol.h @@ -24,7 +24,7 @@ bool TryParse(uint8_t *&bufferCursor, uint32_t &bufferLen, T &result) if (bufferLen < sizeof(T)) return false; - result = *(reinterpret_cast<T *>(bufferCursor)); + memcpy(&result, bufferCursor, sizeof(T)); bufferCursor += sizeof(T); bufferLen -= sizeof(T); return true; |