summaryrefslogtreecommitdiff
path: root/src/classlibnative
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2019-05-14 19:07:53 -0700
committerGitHub <noreply@github.com>2019-05-14 19:07:53 -0700
commit718598334310f6ad331ba2893ee4557beffaa74c (patch)
tree7bc4830b29442e79be150b67dc0f67473e5ba681 /src/classlibnative
parent6a85ca560a7dfa109c6f17c0b76d93373dbd5a00 (diff)
downloadcoreclr-718598334310f6ad331ba2893ee4557beffaa74c.tar.gz
coreclr-718598334310f6ad331ba2893ee4557beffaa74c.tar.bz2
coreclr-718598334310f6ad331ba2893ee4557beffaa74c.zip
Fix issues reported by PREfast static analysis tool (#24577)
Diffstat (limited to 'src/classlibnative')
-rw-r--r--src/classlibnative/bcltype/arraynative.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/classlibnative/bcltype/arraynative.cpp b/src/classlibnative/bcltype/arraynative.cpp
index 528105a476..605cd2905b 100644
--- a/src/classlibnative/bcltype/arraynative.cpp
+++ b/src/classlibnative/bcltype/arraynative.cpp
@@ -591,7 +591,7 @@ void ArrayNative::UnBoxEachElement(BASEARRAYREF pSrc, unsigned int srcIndex, BAS
MethodTable * pDestMT = destTH.GetMethodTable();
PREFIX_ASSUME(pDestMT != NULL);
- const unsigned int destSize = pDestMT->GetNumInstanceFieldBytes();
+ SIZE_T destSize = pDest->GetComponentSize();
BYTE* srcData = (BYTE*) pSrc->GetDataPtr() + srcIndex * sizeof(OBJECTREF);
BYTE* data = (BYTE*) pDest->GetDataPtr() + destIndex * destSize;