mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
limit stack to ~28KB for decompressing kernel
This commit is contained in:
parent
e0df2a342b
commit
193e085cf0
|
@ -220,7 +220,12 @@ void PackVmlinuxI386::pack(OutputFile *fo)
|
|||
ft.buf_len = ph.u_len;
|
||||
ft.addvalue = 0; // we are independent of actual runtime address; see ckt32
|
||||
|
||||
compressWithFilters(&ft, 1 << 20);
|
||||
upx_compress_config_t cconf; cconf.reset();
|
||||
#if 1 //{
|
||||
// limit stack size needed for runtime decompression
|
||||
cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ushort: ~28KB stack
|
||||
#endif //}
|
||||
compressWithFilters(&ft, 512, 0, NULL, &cconf);
|
||||
|
||||
const unsigned lsize = getLoaderSize();
|
||||
MemBuffer loader(lsize);
|
||||
|
|
Loading…
Reference in New Issue
Block a user