Skip to content

Commit 5acd35b

Browse files
committed
Fix hard crash on files smaller than 4/8 bytes
1 parent 28d55f7 commit 5acd35b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "quicktag"
3-
version = "0.5.0"
3+
version = "0.5.1"
44
edition = "2021"
55

66
[dependencies]

src/gui/tag.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ impl TagView {
108108
std::ptr::copy_nonoverlapping(
109109
tag_data.as_ptr(),
110110
data_chunks_u32.as_mut_ptr() as *mut u8,
111-
tag_data.len(),
111+
data_chunks_u32.len() * 4,
112112
);
113113
std::ptr::copy_nonoverlapping(
114114
tag_data.as_ptr(),
115115
data_chunks_u64.as_mut_ptr() as *mut u8,
116-
tag_data.len(),
116+
data_chunks_u64.len() * 8,
117117
);
118118
}
119119

0 commit comments

Comments
 (0)