Ip016 — OFF face names a negative vertex index (unvalidated, wraps to the last vertex)

§12.15 import-format parser robustness (sub-class: negative-index-underflow)

P2 — spec deviation (no data loss)

topology

Sources

Description

An OFF file declares 5 vertices (indices 0–4) but a face record `3 0 1 -1` uses `-1` as its third index. The OFF format has no concept of relative/negative indices (unlike OBJ) — every index must be an absolute, non-negative offset into the vertex table. A loader that stores face indices as plain signed integers without an explicit non-negative check, then later indexes the vertex array with them, hands the negative value straight to a language-level indexing operator.

Reproducer recipe

an OFF file whose face `k i0 i1 …` includes a negative index among otherwise-valid indices.

Expected kernel behavior

reject any face index < 0 at parse time with a diagnostic; never pass a negative value into vertex-array indexing.

Notes

Cross-oracle: trimesh 4.12.2 `trimesh.load()` succeeds with `m.faces == [[0, 1, -1]]` (the `-1` is kept, unvalidated) and `m.triangles` then silently substitutes the vertex at index 4 (`(99.0, 99.0, 99.0)`, deliberately placed far from the other 4 vertices to make the divergence unambiguous) via Python/NumPy negative-index wraparound — no exception, no diagnostic, a plausible-looking but entirely wrong triangle — verified 2026-07-12. Distinct from Ip010 (positive OOB, which trimesh rejects — raises IndexError during processing) and from Ip006 (OBJ negative index, which trimesh also rejects with IndexError): OFF's negative-index path is the one variant in the corpus that neither raises nor drops the face, but silently fabricates wrong geometry. Synonyms: "OFF negative face index", "negative index wraparound", "OFF -1 vertex reference", "silent wrong-vertex substitution". Provenance tier: bytes-only.

Expected validation

Provenance tier

bytes-only — defect not fully embodied in fixture bytes.

Byte assertions

Cross-references

Ip010, Ip006

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1OFF
2# Ip016 OFF face names a negative vertex index (assimp#2228 family; cf. Ip006 OBJ negative-index)
35 1 0
40.0 0.0 0.0
51.0 0.0 0.0
60.0 1.0 0.0
71.0 1.0 0.0
899.0 99.0 99.0
93 0 1 -1