mirror of
https://github.com/switchbrew/switch-tools.git
synced 2025-07-03 02:22:15 +02:00
Fix potential buffer overflow in blz compression
This commit is contained in:
parent
648a5037e8
commit
7a37cf6c66
@ -286,7 +286,7 @@ u8 *BLZ_Code(u8 *raw_buffer, int raw_len, u32 *new_len, int best) {
|
||||
|
||||
*(u32 *)pak = 0; pak += 4;
|
||||
} else {
|
||||
tmp = (u8 *) Memory(raw_tmp + pak_tmp + 11, sizeof(char));
|
||||
tmp = (u8 *) Memory(raw_tmp + pak_tmp + 15, sizeof(char));
|
||||
|
||||
for (len = 0; len < raw_tmp; len++)
|
||||
tmp[len] = raw_buffer[len];
|
||||
|
Loading…
Reference in New Issue
Block a user