Skip to content

OcdFileExport: Fix OCD v8 object size calculation - #2290

Merged
dg0yt merged 2 commits into
OpenOrienteering:masterfrom
lpechacek:issue-XXX-invalid-ocd8-long-linex
Oct 31, 2024
Merged

OcdFileExport: Fix OCD v8 object size calculation#2290
dg0yt merged 2 commits into
OpenOrienteering:masterfrom
lpechacek:issue-XXX-invalid-ocd8-long-linex

Conversation

@lpechacek

@lpechaceklpechacek commented Oct 31, 2024

Copy link
Copy Markdown
Member

Although OCD v8 is an old one, Mapper is the only software left to support writing these files. In my opinion, bugs are worth fixing in this part of the code.

ClosesGH-291.

Objects with a large number of coordinates overflown the 16-bit integer
allocated for the object size. As a result, Mapper produced invalid
entries for these objects.
The actual number of object coordinates is limited by the object's
num_items data entry which is indeed a signed short integer. We are now
checking for this condition and refusing to export these objects as
they are invalid in the context of this file format.
@dg0yt

Copy link
Copy Markdown
Member

macOS CI: Flaky CPack step, unrelated. Re-run must wait while I try to integrate the general CI updates.

@dg0ytdg0yt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks Libor.

@dl3sdo

Copy link
Copy Markdown
Member

Will close #291

@dg0yt
dg0yt merged commit 80afb71 into OpenOrienteering:masterOct 31, 2024
Sign up for freeto 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.

OCD export broken for long path objects

3 participants

@lpechacek@dg0yt@dl3sdo