mirror of https://github.com/upx/upx.git
Fix attempted recovery from corrupted b_info
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66271&q=label%3AProj-upx modified: p_lx_elf.cpp
This commit is contained in:
parent
2ea316d754
commit
4c32a8e3d4
|
@ -8618,7 +8618,7 @@ void PackLinuxElf32::unpack(OutputFile *fo)
|
|||
}
|
||||
}
|
||||
int boff = find_le32(peek_arr, sizeof(peek_arr), size);
|
||||
if (boff < 0) {
|
||||
if (boff < 0 || sizeof(peek_arr) < (sizeof(*bp) + boff)) {
|
||||
throwCantUnpack("b_info corrupted");
|
||||
}
|
||||
bp = (b_info *)(void *)&peek_arr[boff];
|
||||
|
|
Loading…
Reference in New Issue