import-examples/12-15-import-formats/Ip002.ply
Sources
- Pattern-mined from assimp/assimp#5729 + OSS-Fuzz 6544205135544320 (`LoadVertex` heap-overflow WRITE
- fix PR#5956) (BSD-3-Clause — pattern only, no bytes copied).
Description
An ASCII PLY header declares `element vertex 5` but the body streams only 3 vertex rows before the `face` element begins. A header-trusting loader keeps writing into the vertex buffer for the declared count, consuming the face row (and past-EOF bytes) as if they were vertex coordinates — the assimp defect was a heap-overflow write. The single most common file-level import defect: declared count > actual body data.
Reproducer recipe
an ASCII PLY whose `element vertex N` line names a larger N than the number of coordinate rows physically present before the next element.
Expected kernel behavior
bound every vertex write to the rows actually present; stop at EOF / the next element token and reject with a diagnostic (declared N vs parsed count), never write past the allocation.
Notes
Cross-oracle: trimesh 4.12 mis-parses to 4 vertices / 0 faces (consumes the face row as vertex data) instead of the intended 3 vertices / 1 face; assimp overflows (#5729) — verified 2026-07-12. Synonyms: "PLY vertex count mismatch", "header count exceeds body", "declared more vertices than present", "PLY LoadVertex overflow". Provenance tier: bytes-only.
Expected validation
Provenance tier
bytes-only — defect not fully embodied in fixture bytes.
Byte assertions
contains(b'element vertex 5')
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ply 2format ascii 1.0 3comment Ip002 assimp#5729 header vertex count exceeds body rows 4element vertex 5 5property float x 6property float y 7property float z 8element face 1 9property list uchar int vertex_indices 10end_header 110.0 0.0 0.0 121.0 0.0 0.0 130.0 1.0 0.0 143 0 1 2