Skip to content

Commit

Permalink
Place an invalid value in pad2
Browse files Browse the repository at this point in the history
  • Loading branch information
scouten-adobe committed Mar 4, 2025
1 parent 4019779 commit 1feff22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cawg_identity/src/builder/identity_assertion_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ fn finalize_identity_assertion(
}

ia.pad1 = vec![0u8; assertion_size - assertion_cbor.len() - 15];
ia.pad1[0] = 1; // INVALID

assertion_cbor.clear();
ciborium::into_writer(&ia, &mut assertion_cbor)
Expand All @@ -194,6 +193,8 @@ fn finalize_identity_assertion(
assertion_size - assertion_cbor.len() - 6
]));

ia.pad2.as_mut().unwrap()[0] = 1; // INVALID

assertion_cbor.clear();
ciborium::into_writer(&ia, &mut assertion_cbor)
.map_err(|e| c2pa::Error::BadParam(e.to_string()))?;
Expand Down

0 comments on commit 1feff22

Please sign in to comment.