feat: implemented the whole process

This commit is contained in:
Strix 2023-10-14 22:39:40 +02:00
parent 59b77fd07f
commit 61e3c450b7
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774
9 changed files with 64 additions and 25 deletions

View file

@ -13,7 +13,7 @@ impl TryFrom<Vec<u8>> for PKGFile {
.iter()
.map(|v| u32::from(*v))
.collect();
let manifest_size: u32 = ((header[1] << 8) | header[2]);
let manifest_size: u32 = (header[1] << 8) | header[2];
if manifest_size > value.len() as u32 {
return Err(());
}