diff options
author | Jan Kotas <jkotas@microsoft.com> | 2019-05-14 19:07:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-14 19:07:53 -0700 |
commit | 718598334310f6ad331ba2893ee4557beffaa74c (patch) | |
tree | 7bc4830b29442e79be150b67dc0f67473e5ba681 /src/classlibnative | |
parent | 6a85ca560a7dfa109c6f17c0b76d93373dbd5a00 (diff) | |
download | coreclr-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.cpp | 2 |
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; |