From 052d617bfa1074b11f3f53616c4e8a16a3d19ed2 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Tue, 24 Nov 2026 17:58:47 +0800 Subject: [PATCH] test(apple): verify keyed archive controls before altering the trailer --- .../keyedArchiveIntegerAmbiguity.test.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/boundary/filesystem/keyedArchiveIntegerAmbiguity.test.ts b/tests/boundary/filesystem/keyedArchiveIntegerAmbiguity.test.ts index 237e7246c9..3e8363377b 100644 --- a/tests/boundary/filesystem/keyedArchiveIntegerAmbiguity.test.ts +++ b/tests/boundary/filesystem/keyedArchiveIntegerAmbiguity.test.ts @@ -42,17 +42,17 @@ const fixture = async (scenario: (typeof scenarios)[number]) => { $objects: ["$null", { real: 9007199254740992 }], }), ); - const trailer = bytes.length - 32; - // Add one unreachable offset entry backed by the first trailer byte. The - // locked primary decoder accepts it; supplemental pre-trailer capacity does not. - bytes.writeBigUInt64BE( - bytes.readBigUInt64BE(trailer + 8) + 1n, - trailer + 8, - ); const original = parseBinary(bytes); expect(original).toMatchObject({ $objects: ["$null", { real: 9007199254740992 }], }); + const trailer = bytes.length - 32; + // Add one unreachable offset entry backed by the first trailer byte. The + // reachable object graph is unchanged, but the supplemental table no longer fits. + bytes.writeBigUInt64BE( + bytes.readBigUInt64BE(trailer + 8) + 1n, + trailer + 8, + ); } else { let xml = build(source) .replace(