Skip to content

Commit

Permalink
rg_storage: Fixed alignment in zip function
Browse files Browse the repository at this point in the history
  • Loading branch information
ducalex committed Jul 19, 2024
1 parent 32e0efe commit 01c69b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/retro-go/rg_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ bool rg_storage_unzip_file(const char *zip_path, const char *filter, void **data

size_t stream_offset = header_pos + 30 + header.filename_size + header.extra_field_size;
size_t uncompressed_size = header.uncompressed_size;
void *uncompressed_stream = malloc(((uncompressed_size & ~data_align) + data_align));
void *uncompressed_stream = malloc((uncompressed_size + (data_align - 1)) & ~(data_align - 1));
size_t compressed_size = header.compressed_size;
void *compressed_stream = malloc(compressed_size);
tinfl_decompressor *decomp = malloc(sizeof(tinfl_decompressor));
Expand Down

0 comments on commit 01c69b5

Please sign in to comment.