summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Salem <josalem@microsoft.com>2020-02-12 18:14:46 -0800
committerGleb Balykov <g.balykov@samsung.com>2020-03-25 15:29:41 +0300
commit704aff08762448cf0df22f2517b0b9fca6405623 (patch)
tree5869449a9cd0859dc8e1a4684a95bec1cf18bb3d /src
parent4ea577852d4134d44518a2b36cef81a173a2c947 (diff)
downloadcoreclr-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.h2
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;