Skip to content

Commit 7d223f6

Browse files
committed
fix heap corruption in wii rvz ra hash
1 parent b3620f1 commit 7d223f6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cheevos/cheevos_rvz.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1372,7 +1372,7 @@ static bool rvz_decompress_chunk(rcheevos_rvz_file_t* rvz, uint32_t group_index,
13721372
out_data, out_size);
13731373

13741374
/* Raw uncompressed data - copy and handle exception lists if needed */
1375-
decompressed_data = (uint8_t*)malloc(decompressed_size);
1375+
decompressed_data = (uint8_t*)malloc(compressed_size > decompressed_size ? compressed_size : decompressed_size);
13761376
if (!decompressed_data)
13771377
return false;
13781378

0 commit comments

Comments
 (0)