uri: Backport pre-tinf-removal variable assignments

This commit is contained in:
mintsuki 2023-04-08 03:10:53 +02:00
parent aca7e65c2f
commit f79c111f19
1 changed files with 2 additions and 0 deletions

View File

@ -272,6 +272,8 @@ struct file_handle *uri_open(char *uri) {
if (compressed && ret != NULL) {
struct file_handle *compressed_fd = ext_mem_alloc(sizeof(struct file_handle));
fread(ret, &compressed_fd->size, ret->size - 4, sizeof(uint32_t));
compressed_fd->fd = ext_mem_alloc(compressed_fd->size);
void *src = freadall(ret, MEMMAP_BOOTLOADER_RECLAIMABLE);
if (tinf_gzip_uncompress(compressed_fd->fd, src, ret->size)) {
panic(true, "tinf error");