fix: bound aggregate FSSHTTP references

This commit is contained in:
2026-07-22 20:10:09 +02:00
parent 16eb996ad0
commit e44ff78511
3 changed files with 113 additions and 4 deletions

View File

@@ -27,6 +27,7 @@ import {
readFssHttpSerialNumber,
readFssHttpStreamHeader,
takeFssHttpHeaderBody,
type FssHttpReferenceBudget,
} from './primitives.js';
import {
FSSHTTP_OBJECT,
@@ -48,6 +49,7 @@ interface DataElementContext {
objectCount: number;
blobCount: number;
totalBlobBytes: number;
referenceBudget: FssHttpReferenceBudget;
}
export function parseFssHttpDataElementPackage(
@@ -89,6 +91,7 @@ export function parseFssHttpDataElementPackage(
objectCount: 0,
blobCount: 0,
totalBlobBytes: 0,
referenceBudget: { limit: limits.maxObjectReferences, used: 0 },
};
while (!hasFssHttpEnd(reader, FSSHTTP_OBJECT.dataElementPackage)) {
@@ -533,8 +536,16 @@ function parseObjectGroupData(
const header = readFssHttpStreamHeader(reader);
if (header.compound) unexpectedCompound(header, 'Object Group data entry');
const body = takeFssHttpHeaderBody(reader, header, 'Object Group data entry');
const objectReferences = readFssHttpExGuidArray(body, context.limits);
const cellReferences = readFssHttpCellIdArray(body, context.limits);
const objectReferences = readFssHttpExGuidArray(
body,
context.limits,
context.referenceBudget
);
const cellReferences = readFssHttpCellIdArray(
body,
context.limits,
context.referenceBudget
);
let result: FssHttpObjectGroupData;
if (header.type === FSSHTTP_OBJECT.objectGroupDataExcluded) {
result = {