diff --git a/tests/test_glb_skinning.py b/tests/test_glb_skinning.py index 5651b5467..168679a05 100644 --- a/tests/test_glb_skinning.py +++ b/tests/test_glb_skinning.py @@ -648,6 +648,35 @@ class GlbSkinningTests(unittest.TestCase): self.assertIn("must not overwrite the input", proc.stderr) self.assertEqual(before, path.read_bytes()) + def test_analysis_does_not_copy_large_unused_payloads(self): + doc, binary, _ = glb_skinning.parse_glb(make_glb()) + size = 4 * 1024 * 1024 + doc["buffers"][0]["byteLength"] = size - 1 + raw = build_glb(doc, binary.ljust(size - 1, b"\0")) + extension = struct.pack("