]> git.kaiwu.me - quickjs.git/commitdiff
correctly seal template objects when deserializing them (#598)
authorFabrice Bellard <fabrice@bellard.org>
Sat, 7 Nov 2026 11:12:29 +0000 (12:12 +0100)
committerFabrice Bellard <fabrice@bellard.org>
Sat, 7 Nov 2026 11:12:29 +0000 (12:12 +0100)
quickjs.c

index ccd86d4097f5021a64478d2b353b39eeb15c97a0..d4ab4c3bfe3efebae4aab80997663387fdac459b 100644 (file)
--- a/quickjs.c
+++ b/quickjs.c
@@ -40313,7 +40313,8 @@ static JSValue JS_ReadArray(BCReaderState *s, int tag)
             if (ret < 0)
                 goto fail;
         }
-        JS_PreventExtensions(ctx, obj);
+        if (seal_template_obj(ctx, obj))
+            goto fail;
     }
     return obj;
  fail: