Fix GetObjectReferences API when caller doesn't zero the param (#24299)
authorMukul Sabharwal <mjsabby@gmail.com>
Tue, 30 Apr 2019 00:42:13 +0000 (17:42 -0700)
committerJan Kotas <jkotas@microsoft.com>
Tue, 30 Apr 2019 00:42:13 +0000 (17:42 -0700)
src/vm/proftoeeinterfaceimpl.cpp

index 74985a7..467ab29 100644 (file)
@@ -6836,6 +6836,7 @@ HRESULT ProfToEEInterfaceImpl::GetObjectReferences(ObjectID objectId, ULONG32 cN
     {
         if (cNumReferences == 0)
         {
+            *pcNumReferences = 0;
             GCHeapUtilities::GetGCHeap()->DiagWalkObject(pBO, &CountContainedObjectRef, (void*)pcNumReferences);
         }
         else