mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
Check Mach_fat_arch.align
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65558 https://github.com/upx/upx/issues/765 modified: p_mach.cpp
This commit is contained in:
parent
28f26da6ab
commit
b87f60a917
|
@ -2267,6 +2267,11 @@ unsigned PackMachFat::check_fat_head()
|
|||
}
|
||||
for (unsigned j=0; j < nfat; ++j) {
|
||||
unsigned const align = arch[j].align;
|
||||
if (24 < align) {
|
||||
char msg[80]; snprintf(msg, sizeof(msg),
|
||||
"bad fat_arch alignment 0x%x > 24", align);
|
||||
throwCantPack(msg);
|
||||
}
|
||||
unsigned const mask = ~(~0u<<align);
|
||||
unsigned const size = arch[j].size;
|
||||
unsigned const offset = arch[j].offset;
|
||||
|
|
Loading…
Reference in New Issue
Block a user