Commit Graph

338 Commits

Author SHA1 Message Date
Markus F.X.J. Oberhumer aedbf02830 p_lx_elf.cpp: silence a clang-4.0 compilation warning. 2017-03-23 17:43:23 +01:00
John Reiser 8232aedf78 unpackExtent() segregates rewrite() from write()
Fix the reported output file size when un-compressing.
Part of https://github.com/upx/upx/issues/60
	modified:   p_lx_elf.cpp
	modified:   p_unix.cpp
	modified:   p_unix.h
2017-02-11 15:26:27 -08:00
John Reiser 7f3e7da7c7 Stubs LZMA_DEC00 and LZMA_ELF00 fall through; no "+80C" alignment.
https://github.com/upx/upx/issues/60  (partial)
addStubEntrySections() and getDecompressorSections()
	modified:   p_lx_elf.cpp
	modified:   p_mach.cpp
	modified:   packer_c.cpp
2017-02-05 14:52:09 -08:00
Markus F.X.J. Oberhumer c4da5e81fa Welcome 2017. 2017-01-03 12:02:07 +01:00
Markus F.X.J. Oberhumer 0ccbc5f139 Silence some bogus coverity warnings. 2016-12-21 19:03:01 +01:00
Markus F.X.J. Oberhumer 0b4ac35bc9 Tune some MSVC warnings. 2016-12-19 22:57:43 +01:00
John Reiser a1cabd5a68 Avoid warning C4805: '|': unsafe mix of type 'bool' and type 'unsigned int' in operation
modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
2016-12-18 11:32:47 -08:00
John Reiser 134b829d59 prevent warning C4319: '~': zero extending 'const unsigned int' to 'upx_uint64_t' of greater size
modified:   linker.cpp
	modified:   p_lx_elf.cpp
	modified:   pefile.cpp
2016-11-19 16:46:01 -08:00
Thierry Fauck b1c07c22ce powerpc64le -fpic dynamically linked binary support
Update stub for -fpic support
 Handle 64K page in p_lx_elf.cpp

Signed-off-by: Thierry Fauck <tfauck@free.fr>
2016-11-08 18:29:10 +01:00
John Reiser c2c970ee33 pacify c++-analyzer
modified:   p_lx_elf.cpp
2016-10-19 15:19:33 -07:00
John Reiser 44328aee76 fix brk() problem when is_big: stub must munmap all_pages
https://github.com/upx/upx/issues/5
	modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
2016-10-15 14:06:56 -07:00
John Reiser d688a05ac7 DT_JMPREL vanished (binutils-2.26.1); check all DT_RELA.
modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
2016-10-09 21:50:45 -07:00
John Reiser ca2293f6d3 c++-analyzer needs improved range tracking.
modified:   p_lx_elf.cpp
2016-10-09 09:33:35 -07:00
John Reiser e3fe0dc89b Avoid bug in ld-linux to set brk(0) when .p_align is large.
modified:   p_lx_elf.cpp
2016-10-03 09:41:05 -07:00
John Reiser 977024ea94 Fix clang scan-build errors.
modified:   p_lx_elf.cpp
2016-10-01 17:38:16 -07:00
Markus F.X.J. Oberhumer b9b3b67b95 Silence some pedantic compilation warnings about unused results. 2016-09-28 13:50:50 +02:00
Markus F.X.J. Oberhumer f7554374ab Update email address. 2016-09-28 12:25:01 +02:00
Markus F.X.J. Oberhumer 96d9968db5 Welcome 2016. 2016-09-22 14:07:14 +02:00
Markus F.X.J. Oberhumer aef54a4bfd Update source for previous rename. 2016-09-22 12:12:43 +02:00
Markus F.X.J. Oberhumer 1bc8b6f46e Update source for previous rename. 2016-09-22 11:29:12 +02:00
Markus F.X.J. Oberhumer 10a0469221 Update source for previous rename. 2016-09-22 10:56:33 +02:00
Markus F.X.J. Oberhumer 8b0101dcab Update source for previous rename. 2016-09-22 10:25:45 +02:00
Markus F.X.J. Oberhumer ea2bddf245 Fix one more file_image usage. 2016-09-22 00:58:43 +02:00
Markus F.X.J. Oberhumer 242f606a29 p_lx_elf.h: turn file_image into a MemBuffer. 2016-09-21 22:22:41 +02:00
Markus F.X.J. Oberhumer 3765ca4e92 Cleanups and cruft removal. 2016-09-21 21:33:53 +02:00
John Reiser d2830db94d Fix memory leak
modified:   p_lx_elf.cpp
2016-09-20 20:43:48 -07:00
Markus F.X.J. Oberhumer 1bb0fa1809 Fix a few things spotted by the gcc-6 sanitizer. Needs review. 2016-09-21 00:35:51 +02:00
Markus F.X.J. Oberhumer 7af6c4b10e Use new style casts. Cleanups. 2016-09-20 20:59:34 +02:00
John Reiser 48ce1f1814 Merge branch 'master' of https://github.com/upx/upx 2016-09-20 10:56:00 -07:00
John Reiser 5151c8a505 Indentation error detected by g++-6
modified:   p_lx_elf.cpp
2016-09-20 10:55:14 -07:00
Markus F.X.J. Oberhumer 44248f19b5 Introduce mem_size() and New() and start using it. 2016-09-20 15:24:07 +02:00
Markus F.X.J. Oberhumer e4723e0bad Avoid some compiler warnings. 2016-09-20 10:54:27 +02:00
John Reiser 01a0c8672d changeset: 2451:4e2a6c33d5fb
tag: ppc64le
user: Thierry Fauck <tfauck@free.fr>
date: Wed Jun 22 08:25:13 2016 -0400
summary: Add support for ppc64le statically linked binaries
2016-07-26 17:00:25 -07:00
John Reiser 53b45279ad Better diagnosis of Go-language PT_LOAD; https://sourceforge.net/p/upx/bugs/195/ 2015-07-25 07:11:57 -07:00
John Reiser 298ea1f0d3 ::unpack(): another check on b_info; uncompressed ElfXX_Ehdr must match input 2015-05-16 15:23:01 -07:00
John Reiser 759827b404 EI_OSABI for EM_ARM is a real mess 2015-05-15 20:47:35 -07:00
John Reiser 330fca722a too large: blocksize > 1024*1024*1024 [corrupted] 2015-05-15 05:36:21 -07:00
John Reiser cdd152d015 Detect (int)blocksize < 0 2015-05-09 20:13:30 -07:00
John Reiser 83ce7dc62f Must not compare orig_file_size with fi->st_size() during ::unpack 2015-05-09 17:47:17 -07:00
John Reiser b182b50f24 Distinguish corruption of p_info, b_info 2015-05-09 10:13:13 -07:00
John Reiser c777da263e Check blocksize. CERT-FI 829767
id:000053,sig:06,src:000000,op:arith8,pos:10440,val:+20
2015-05-09 07:25:25 -07:00
John Reiser 2cb7b56a41 Check ph.c_len; CERT-FI 829767
id:000023,sig:06,src:000000,op:flip2,pos:10440
2015-05-09 07:18:54 -07:00
John Reiser 8d6c594240 Check ph.c_len; CERT-FI 829767
id:000008,sig:06,src:000000,op:flip1,pos:205
2015-05-09 07:05:17 -07:00
John Reiser 771fd732d1 Check e_phentsize; CERT-FI 829767
id:000064,sig:06,sync:upx-macho-crash-2,src:000096
2015-05-09 05:31:36 -07:00
John Reiser 7ca14d209c Use upx_uint64_t instead of "unsigned long". 2015-01-10 12:26:35 -08:00
Markus F.X.J. Oberhumer 9fa1772ae4 Merge. 2015-01-03 00:34:42 +01:00
John Reiser 51ee664cae PackLinuxElf32help1 refuses if e_ident[EI_DATA] mismatches bele policy 2015-01-02 15:25:29 -08:00
Markus F.X.J. Oberhumer fb611a98f9 Welcome 2015. 2015-01-03 00:24:07 +01:00
Markus F.X.J. Oberhumer a26c982e93 Welcome 2014. 2014-01-07 23:05:10 +01:00
John Reiser cd3132667a ARM shlib escape hatch moves to just beyond .text.
https://sourceforge.net/p/upx/bugs/223/
2013-11-22 19:26:19 -08:00