diff options
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); |