Skip to content

Fix SonyMisc3c metadata reconstruction through string setters - #9538

Open
wilx wants to merge 1 commit into
Exiv2:mainfrom
wilx:fix-sony-misc3c-export
Open

wilx wants to merge 1 commit into
Exiv2:mainfrom
wilx:fix-sony-misc3c-export

Conversation

@wilx

@wilx wilx commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #2670.

Default unknown SonyMisc3c fields to unsigned bytes. Reconstructing metadata through string setters previously assigned ASCII values that overlapped adjacent fields and caused “Failed to write image.” Keep the TIFF writer's size checks intact and preserve unknown fields.

Add unit and CLI regressions, including fresh serialization in both TIFF byte orders. Both downloaded Sony samples retain all 546/552 group fields exactly; compressed JPEG data remains unchanged, and the LG control still works.

Validated on Linux: full serial debug CTest (8/8 groups), focused debug/no-XMP/ASan/UBSan and Meson tests, and clang-format 20 checks.

AI assistance: developed with OpenAI Codex.

@wilx
wilx force-pushed the fix-sony-misc3c-export branch from d8e8ca6 to aa92ce0 Compare November 4, 2026 22:41
Use unsigned bytes for unknown SonyMisc3c fields so string assignment does
not expand numeric values into adjacent fields when rebuilding MakerNotes.
Preserve the TIFF writer size checks and all decoded array values.

Add default-type, byte-boundary, fresh-serialization, and CLI regressions,
including both outer TIFF byte orders.

Fixes Exiv2#2670.
@wilx
wilx force-pushed the fix-sony-misc3c-export branch from aa92ce0 to cce5655 Compare November 22, 2026 15:24
@mergify

mergify Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request once it meets the queue conditions

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.

exiv2 0.28 breaks gimp jpeg metadata export

1 participant