From b728b0e021bc499e9b32ef2011c2f9f0f5fdf1cc Mon Sep 17 00:00:00 2001 From: John Reiser Date: Wed, 7 May 2025 13:52:58 -0700 Subject: [PATCH] buildLinuxLoader needs more space for shlib + lzma + Android https://github.com/upx/upx/issues/913 modified: p_lx_elf.cpp --- src/p_lx_elf.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp index 2e18a29b..b57dfe5a 100644 --- a/src/p_lx_elf.cpp +++ b/src/p_lx_elf.cpp @@ -1532,7 +1532,7 @@ PackLinuxElf32::buildLinuxLoader( // EXP_TAIL FIXME: unfilter // SO_TAIL // SO_MAIN C-language supervision based on PT_LOADs - char sec[120]; memset(sec, 0, sizeof(sec)); // debug convenience + char sec[200]; memset(sec, 0, sizeof(sec)); // debug convenience int len = 0; unsigned m_decompr = methods_used | (1u << (0xFF & ph_forced_method(ph.method))); len += snprintf(sec, sizeof(sec), "%s", "SO_HEAD,ptr_NEXT,EXP_HEAD"); @@ -1584,7 +1584,7 @@ PackLinuxElf32::buildLinuxLoader( || this->e_machine==Elf32_Ehdr::EM_MIPS ) { // main program with ELF2 de-compressor (folded portion) initLoader(fold, szfold); - char sec[120]; memset(sec, 0, sizeof(sec)); // debug convenience + char sec[200]; memset(sec, 0, sizeof(sec)); // debug convenience int len = 0; unsigned m_decompr = methods_used | (1u << (0xFF & ph_forced_method(ph.method))); len += snprintf(sec, sizeof(sec), "%s", ".text,EXP_HEAD"); @@ -1729,7 +1729,7 @@ PackLinuxElf64::buildLinuxLoader( // EXP_TAIL FIXME: unfilter // SO_TAIL // SO_MAIN C-language supervision based on PT_LOADs - char sec[120]; memset(sec, 0, sizeof(sec)); // debug convenience + char sec[200]; memset(sec, 0, sizeof(sec)); // debug convenience int len = 0; unsigned m_decompr = methods_used | (1u << (0xFF & ph_forced_method(ph.method))); len += snprintf(sec, sizeof(sec), "%s", "SO_HEAD,ptr_NEXT,EXP_HEAD"); @@ -1774,7 +1774,7 @@ PackLinuxElf64::buildLinuxLoader( || this->e_machine==Elf64_Ehdr::EM_PPC64 ) { // main program with ELF2 de-compressor (folded portion) initLoader(fold, szfold); - char sec[120]; memset(sec, 0, sizeof(sec)); // debug convenience + char sec[200]; memset(sec, 0, sizeof(sec)); // debug convenience int len = 0; unsigned m_decompr = methods_used | (1u << (0xFF & ph_forced_method(ph.method))); len += snprintf(sec, sizeof(sec), "%s", ".text,EXP_HEAD");