Ls043 — Excessively long entity name

§12.1c lexical / identifier limits

P1 — silent data loss

syntax

Sources

Description

Parser copies entity name into a fixed-size identifier buffer; classic strcpy overflow. ISO conformance class permits long names but not unbounded. Embedded `-` (hyphen) in identifiers is also disallowed (`BS7752-1`).

Reproducer recipe

`#1=AAAA…(64 KiB)…(..);` and `#2=BS7752-1(..)`.

Expected kernel behavior

Maximum identifier length per ISO conformance class (e.g. 256 chars); reject overflow before allocation. Reject `-` in identifiers; lenient mode may map to `_`.

Notes

Synonyms: "very long STEP entity name", "fixed-buffer overflow on long name", "hyphen in STEP identifier", "BS7752-1 entity name rejected", "STEP entity name with dash".

Expected validation

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

Byte assertions

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1/* Ls043 - Excessively long entity name / hyphen in identifier
2   ----------------------------------------------------------------------
3   Catalog section : §12.1c lexical / identifier limits
4   Sources         : A021, S002
5   ----------------------------------------------------------------------
6   Defect
7     Parser copies entity name into a fixed-size identifier buffer;
8     classic strcpy overflow. ISO conformance class permits long names
9     but not unbounded.
10     Defect 1: entity name is 80 uppercase A's — overflows a 32/64-char buffer.
11     Defect 2: BS7752-1 — hyphen is not a valid identifier character.
12   Expected behavior
13     Reject overflow before allocation (max ~256 chars per ISO);
14     reject hyphen in identifier; lenient mode may map hyphen to underscore.
15   ----------------------------------------------------------------------
16*/
17ISO-10303-21;
18HEADER;
19FILE_DESCRIPTION(('Ls043 - excessively long entity name and hyphen in identifier'),'2;1');
20FILE_NAME('Ls043.stp','2026-06-20T00:00:00',('auto-generated'),(''),
21  'auto-generated','','');
22FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
23ENDSEC;
24DATA;
25/* Defect 1: entity name is 80 uppercase A characters — fixed-buffer overflow */
26#1=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA('overflow-test',(0.,0.,0.));
27/* Defect 2: embedded hyphen in entity name (BS7752-1) */
28/* ISO 10303-21 §4.2: identifiers use letters, digits, underscore only */
29#2=BS7752-1('hyphen-name',(1.,0.,0.));
30ENDSEC;
31END-ISO-10303-21;