Skip to content

Commit

Permalink
modify integral tryparse to use memcpy (#2295)
Browse files Browse the repository at this point in the history
  • Loading branch information
John Salem authored Feb 13, 2020
1 parent c265d9d commit c89e275
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coreclr/src/vm/diagnosticsprotocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c89e275

Please sign in to comment.