Jelajahi Sumber

[CVE-2018-8283] Edge - ChakraCore Memory Corruption - Individual

Jimmy Thomson 7 tahun lalu
induk
melakukan
b2f092ea42
1 mengubah file dengan 5 tambahan dan 1 penghapusan
  1. 5 1
      lib/Runtime/Types/PathTypeHandler.cpp

+ 5 - 1
lib/Runtime/Types/PathTypeHandler.cpp

@@ -1452,7 +1452,11 @@ namespace Js
                 DictionaryPropertyDescriptor<PropertyIndex> *descriptor;
                 bool result = newTypeHandler->propertyMap->TryGetReference(propertyRecord, &descriptor);
                 Assert(result);
-                Assert(attributes[descriptor->GetDataPropertyIndex<false>()] & ObjectSlotAttr_Accessor);
+                if (!(attributes[descriptor->GetDataPropertyIndex<false>()] & ObjectSlotAttr_Accessor))
+                {
+                    // Setter without a getter; this is a stale entry, so ignore it
+                    continue;
+                }
                 Assert(oldTypeHandler->GetSetterSlotIndex(descriptor->GetDataPropertyIndex<false>()) == newTypeHandler->nextPropertyIndex);
                 descriptor->ConvertToGetterSetter(newTypeHandler->nextPropertyIndex);
                 newTypeHandler->ClearHasOnlyWritableDataProperties();