fix: make GIF box map C2PA placeholder len 0 rather than 1#2156
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
|
(Merging in latest main fixes an unused dependency issue flagged by the CI/CD jobs) |
|
@ok-nick |
|
@tmathern When doing a minimal form box hash (everything before c2pa, the c2pa, and after c2pa), the old GIF code gave the empty placeholder C2PA box a length of 1. That would offset all of the subsequent boxes by 1, which is incorrect and would hash the wrong data. See here: c2pa-rs/sdk/src/assertions/box_hash.rs Lines 260 to 358 in 2c0695e |
It can affect the box hashing code when generating hashes with
minimal=true. This change also allows the code to be greatly simplified, I switched from declarative iterator to imperative-style for clarity.This line here is removed: