Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski authored Jul 14, 2024
2 parents ea683f2 + d3b28a5 commit 32cac34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion security-framework/src/passwords.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ fn get_password_and_release(data: CFTypeRef) -> Result<Vec<u8>> {
if type_id == CFData::type_id() {
let val = unsafe { CFData::wrap_under_create_rule(data as CFDataRef) };
let mut vec = Vec::new();
vec.extend_from_slice(val.bytes());
if val.len() > 0 {
vec.extend_from_slice(val.bytes());
}
return Ok(vec);
}
// unexpected: we got a reference to some other type.
Expand Down

0 comments on commit 32cac34

Please sign in to comment.