Explorar o código

[CVE-2020-0970]

Paul Leathers %!s(int64=6) %!d(string=hai) anos
pai
achega
892e45ff85
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      lib/Runtime/Types/PathTypeHandler.cpp

+ 10 - 0
lib/Runtime/Types/PathTypeHandler.cpp

@@ -2013,6 +2013,16 @@ namespace Js
                 {
                     newSetters = this->UpdateSetterSlots(recycler, oldSetters, oldPathSize, newTypePath->GetPathSize());
                 }
+
+#if ENABLE_FIXED_FIELDS
+#ifdef SUPPORT_FIXED_FIELDS_ON_PATH_TYPES
+                if (PathTypeHandlerBase::FixPropsOnPathTypes())
+                {
+                    Assert(this->HasSingletonInstanceOnlyIfNeeded());
+                    this->GetTypePath()->ClearSingletonInstanceIfSame(instance);
+                }
+#endif
+#endif
             }
             else if (growing)
             {