Ad059 — Mismatched weight / pole counts in BSpline (writer-emitted)

§12.11 (sub-class: schema-validation / OOB-read)

silent-loss adversarial

Sources

Description

STEP `RATIONAL_BSPLINE_CURVE` with weights array length ≠ poles array length; reader walks past end of weights vector.

Reproducer recipe

`RATIONAL_BSPLINE_CURVE` with weights `(1.,1.,1.)` and poles `(#1,#2,#3,#4)`.

Expected kernel behavior

validate equality; pad/truncate with warning; never read past either array.

Notes

**See also**: Gn002. **OCC behavior**: silently accepts (no diagnostic, empty result); outside catalog's allowed set ({warn-and-proceed}). Kernel-bug witnessed: catalog wants a warning to surface; OCC accepts without any diagnostic.

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Byte assertions

Tier-3 assertions

Cross-references

Gn002

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1ISO-10303-21;
2/* Ad059: mismatched weight/pole count in RATIONAL_B_SPLINE_CURVE: weights (1.,1.,1.) has 3 entries but poles list has 4 entries; reader walks past end of weights vector → OOB-read; writer-emitted bug: Mantis 0030921 (G024); See also Gn002; GEOMETRIC_CURVE_SET IS model entity — OCC yields empty */
3HEADER;
4FILE_DESCRIPTION(('Ad059'),'2;1');
5FILE_NAME('Ad059.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','','');
6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
7ENDSEC;
8DATA;
9#1=CARTESIAN_POINT('',(0.0,0.0,0.0));
10#2=GEOMETRIC_CURVE_SET('',(#1));
11#3=CARTESIAN_POINT('p0',(0.,0.,0.));
12#4=CARTESIAN_POINT('p1',(1.,1.,0.));
13#5=CARTESIAN_POINT('p2',(2.,0.,0.));
14#6=CARTESIAN_POINT('p3',(3.,1.,0.));
15#7=(B_SPLINE_CURVE_WITH_KNOTS('mismatch',3,(#3,#4,#5,#6),.UNSPECIFIED.,.F.,.F.,(4,4),(0.,1.),.PIECEWISE_BEZIER_KNOTS.)RATIONAL_B_SPLINE_CURVE((1.,1.,1.)));
16#8=RATIONAL_B_SPLINE_CURVE((1.,1.,1.));
17ENDSEC;
18END-ISO-10303-21;