diff options
author | 2025-07-01 00:45:50 +0200 | |
---|---|---|
committer | 2025-07-01 00:45:50 +0200 | |
commit | c752e8780b043c8822be2417cc5596b8f2ad9c0b (patch) | |
tree | c57bae87f86c43d68a74447bad319433f66cb89a /src/ace3.c | |
parent | c17f9d6b17daa6121ec1ef0284d701cd3d1387b2 (diff) | |
download | idevicerestore-c752e8780b043c8822be2417cc5596b8f2ad9c0b.tar.gz idevicerestore-c752e8780b043c8822be2417cc5596b8f2ad9c0b.tar.bz2 |
Update codebase to use (const) void* and size_t where applicable
Diffstat (limited to 'src/ace3.c')
-rw-r--r-- | src/ace3.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -78,7 +78,7 @@ static int uarp_version_convert(uint32_t* version_data, uint32_t* version_out) return 0; } -int ace3_create_binary(const unsigned char* uarp_fw, size_t uarp_size, uint64_t bdid, unsigned int prev, plist_t tss, unsigned char** bin_out, size_t* bin_size) +int ace3_create_binary(const void* uarp_fw, size_t uarp_size, uint64_t bdid, unsigned int prev, plist_t tss, void** bin_out, size_t* bin_size) { struct ace3bin_header { uint32_t magic; // 0xACE00003 @@ -220,7 +220,7 @@ int ace3_create_binary(const unsigned char* uarp_fw, size_t uarp_size, uint64_t uint32_t toc_offset = be32toh(uarp_hdr->toc_offset); uint32_t toc_size = be32toh(uarp_hdr->toc_size); const unsigned char* p = uarp_fw + uarp_hdr_size; - while (p < uarp_fw + toc_size) { + while (p < (const unsigned char*)uarp_fw + toc_size) { struct uarp_toc_entry* entry = (struct uarp_toc_entry*)p; uint32_t te_size = be32toh(entry->this_size); if (strncmp((char*)&(entry->fourcc), payload_4cc, 4) == 0) { @@ -244,7 +244,7 @@ int ace3_create_binary(const unsigned char* uarp_fw, size_t uarp_size, uint64_t uint32_t content_size = data1_size + data2_size + im4m_size + dl_size; - *bin_out = (unsigned char*)malloc(0x40 + content_size); + *bin_out = malloc(0x40 + content_size); struct ace3bin_header* hdr = (struct ace3bin_header*)(*bin_out); hdr->magic = htole32(0xACE00003); hdr->version = htole32(data1_version); |