Skip to content

Commit

Permalink
Fix hard crash on files smaller than 4/8 bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
cohaereo committed Apr 13, 2024
1 parent 28d55f7 commit 5acd35b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quicktag"
version = "0.5.0"
version = "0.5.1"
edition = "2021"

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions src/gui/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ impl TagView {
std::ptr::copy_nonoverlapping(
tag_data.as_ptr(),
data_chunks_u32.as_mut_ptr() as *mut u8,
tag_data.len(),
data_chunks_u32.len() * 4,
);
std::ptr::copy_nonoverlapping(
tag_data.as_ptr(),
data_chunks_u64.as_mut_ptr() as *mut u8,
tag_data.len(),
data_chunks_u64.len() * 8,
);
}

Expand Down

0 comments on commit 5acd35b

Please sign in to comment.