Skip to content

Fix UGrid cell stream validation

Choose a tag to compare

@tchristiansen-aquaveo tchristiansen-aquaveo released this 01 Apr 22:12

This release improves UGrid cell stream validation to detect invalid point IDs.

  • The existing overload of XmUGrid::IsValidCellstream is deprecated. It will now reject negative point IDs, but cannot detect excessively large ones. Undetected large point IDs could cause out-of-bounds array accesses in later code. This overload is now only maintained for compatibility. It may be removed in a future release.
  • A new two-parameter overload of XmUGrid::IsValidCellstream was added, which detects all invalid point IDs. Code which uses the existing single-parameter overload can be updated to use the new one by passing the number of points in the grid for the second parameter.
  • XmUGrid::New now uses the new overload of XmUGrid::IsValidCellstream. Any code using this function will get the improved point ID validation with no further changes.
  • Empty cells at the end of a cell stream are no longer treated as invalid.
  • Cell stream validation is now more thoroughly tested for correctness.