Skip to content

Reject truncated CCB2 coordinate blocks (#37) - #91

Merged
mahach666 merged 1 commit into
mainfrom
codex/reject-truncated-ccb2-xyz
Nov 18, 2026
Merged

mahach666 merged 1 commit into
mainfrom
codex/reject-truncated-ccb2-xyz

Conversation

@mahach666

Copy link
Copy Markdown
Contributor

Closes #37. Follow-up to #89 and #90.

Summary

  • Reject a CCB2 file when a recognized scan's declared XYZ block exceeds the remaining file length. This also applies when valid scans precede the damaged scan.
  • Add synthetic regression cases for truncated XYZ and an oversized point count in the second scan. Both cases reproduced the silent omission before the fix.
  • Document the failure behavior. Packed normal decoding supports CCB2 file versions 41, 42 and 50. The stock version 34 XYZ sample and the version 47 XYZ, RGB and intensity sample without normals also open.

Verification

  • dotnet test PclIO.slnx -c Release with the public Zenodo dataset. On .NET 8 and .NET 10, 1,128 passed and 25 were skipped per target.
  • On both targets, the original Zenodo CCB2 opened with four scans and 2,053,097 points. Both damaged copies raised InvalidDataException. Stock samples for file versions 34, 41, 42, 47 and 50 opened.
  • dotnet docfx docfx.json --warningsAsErrors and git diff --check passed.

@mahach666
mahach666 merged commit 88cfa76 into main Nov 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Format: CloudCompare BIN (*.bin)

1 participant