Commit Graph

3360 Commits

Author SHA1 Message Date
Markus F.X.J. Oberhumer 92064c30ab Avoid a MSVC warning. 2020-12-03 01:44:09 +01:00
Markus F.X.J. Oberhumer 231f07096f Update submodules. 2020-12-03 01:27:05 +01:00
John Reiser b19f5f3282 Yet another attempt to suppress MSVC C4245
https://github.com/upx/upx/issues/435
	modified:   pefile.cpp
2020-11-29 00:01:22 -08:00
John Reiser 037e53f42c Another attempt to suppress MSVC C4245
https://github.com/upx/upx/issues/435
	modified:   pefile.cpp
2020-11-28 23:53:49 -08:00
John Reiser 1bdfa39b45 Attempt workaround for MSVC C4245 signed/unsigned mismatch in template 'argument'
https://github.com/upx/upx/issues/435
	modified:   pefile.cpp
2020-11-28 20:23:01 -08:00
John Reiser 84174b9dd8 Fix MSVC warning C4245: signed/unsigned mismatch in prototype matching
The type of the return value must match exactly the function prototype.
MSVC warning C4245: 'argument': conversion from 'int' to 'unsigned int', signed/unsigned mismatch
https://github.com/upx/upx/issues/435
	modified:   bele_policy.h
2020-11-28 19:45:54 -08:00
John Reiser eb66470933 Check Mach_command.cmdsize
https://github.com/upx/upx/issues/426
Also use MemBuffer to avoid leaks that result from throw()
	modified:   p_mach.cpp
	modified:   p_mach.h
2020-11-28 10:56:28 -08:00
John Reiser d488122324 ptrTEXT in PackMachBase<T>::canUnpack()
https://github.com/upx/upx/issues/417
	modified:   p_mach.cpp
2020-11-06 19:14:18 -08:00
John Reiser c691c1a196 headway vs size
https://github.com/upx/upx/issues/414
	modified:   packhead.cpp
2020-11-06 14:25:36 -08:00
John Reiser 20a0119a12 Merge pull request #416 from liamjm/packheader_more_checks
tweaks: some extra checks on lengths
2020-11-06 14:15:56 -08:00
John Reiser 5cf1aef9fe Merge pull request #407 from Mattiwatti/ignore-bogus-tls-relocs
PE: only add a TLS relocation if tls_handler_offset_reloc != 0
2020-11-06 14:11:00 -08:00
John Reiser 216910263f Merge pull request #413 from bitraid/pe-integrity
Require -f to pack a PE file that demands run-time integrity checking
2020-11-06 14:06:07 -08:00
John Reiser b9fcbd9fbe fillPackHeader: revise and add yet more checks
https://github.com/upx/upx/issues/414
https://github.com/upx/upx/pull/415  revised
	modified:   packhead.cpp
2020-11-06 13:53:29 -08:00
John Reiser 1faaba8f4c omemmove exactly as much
Fix 14992260c60b8d6677a677a9cdfae98b11353df7; revealed by testsuite
	modified:   pefile.cpp
2020-11-05 15:05:52 -08:00
Liam Murphy acfe5fd5be rebase 2020-11-05 22:23:26 +00:00
Liam Murphy 835d26a6c4 fix build 2020-11-05 22:21:19 +00:00
Liam Murphy b2c00aa637 tweaks: some extra checks on lengths 2020-11-05 22:03:47 +00:00
Liam Murphy 84c8e916f6 tweaks: some extra checks on lengths 2020-11-05 04:43:40 +00:00
bitraid 3e30839501 Only pack w/ -f PE files that force integrity check 2020-11-04 10:14:02 +02:00
John Reiser a18ff44eaa fillPackHeader more checks
https://github.com/upx/upx/issues/414
	modified:   packhead.cpp
2020-11-03 01:58:39 -08:00
John Reiser e03310fcc6 Avoid overlap when rebuild relocs.
Based on a hint from a little bird.
	modified:   packer.cpp
2020-09-20 15:08:39 -07:00
John Reiser 14992260c6 Beware overlap when rebuildImports
Based on a hint from a little bird.
	modified:   pefile.cpp
2020-09-20 14:10:24 -07:00
Matthijs Lavrijsen fd7102b14c PE: only add a TLS relocation if tls_handler_offset_reloc != 0 2020-09-08 11:44:56 +02:00
John Reiser 107cd48c93 MSVC strikes again
modified:   p_lx_elf.cpp
2020-09-05 19:19:11 -07:00
John Reiser 0a27bff517 Fix 64-bit ET_EXEC
https://github.com/upx/upx/issues/405
	modified:   p_lx_elf.cpp
	modified:   stub/src/amd64-linux.elf-main.c

	modified:   ../.github/travis_testsuite_1-expected_sha256sums.sh
	modified:   stub/amd64-linux.elf-fold.h
	modified:   stub/arm64-linux.elf-fold.h
	modified:   stub/powerpc64-linux.elf-fold.h
	modified:   stub/powerpc64le-linux.elf-fold.h
	modified:   stub/tmp/amd64-linux.elf-fold.map
	modified:   stub/tmp/arm64-linux.elf-fold.map
	modified:   stub/tmp/powerpc64-linux.elf-fold.map
	modified:   stub/tmp/powerpc64le-linux.elf-fold.map
2020-09-04 10:21:14 -07:00
John Reiser 6428292477 Merge pull request #335 from Mattiwatti/fix-loadconf-align
PE: fix load configuration directory alignment
2020-08-09 07:33:03 -07:00
John Reiser fc1c1924ab Merge pull request #399 from bitraid/no-cfg-pe
Don't pack Cotrol Flow Guard PE files
2020-08-09 07:12:39 -07:00
bitraid c7c7eb6a14 Don't pack Cotrol Flow Guard PE files 2020-07-28 17:36:13 +03:00
John Reiser ebe4d2b78f 0==e_shnum obviates testing of e_shoff
modified:   p_lx_elf.cpp
2020-07-26 20:00:05 -07:00
John Reiser 624eb22d74 Check de-compressed SHT_SYMTAB
https://github.com/upx/upx/issues/396
	modified:   p_lx_elf.cpp
2020-07-25 09:28:02 -07:00
John Reiser 76cd518110 Check Shdr more
https://github.com/upx/upx/issues/395
	modified:   p_lx_elf.cpp
2020-07-25 08:19:45 -07:00
John Reiser 49edccd716 Check .sh_offset and .sh_size in SHT_DYNAMIC and SHT_STRNDX
https://github.com/upx/upx/issues/394
	modified:   p_lx_elf.cpp
2020-07-25 07:41:43 -07:00
John Reiser 8d1d605b3d Avoid 0==nbucket
https://github.com/upx/upx/issues/393
	modified:   p_lx_elf.cpp
2020-07-23 05:44:18 -07:00
John Reiser 8764fdc24c Defend against bad PT_DYNAMIC
https://github.com/upx/upx/issues/391
	modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
2020-07-23 05:09:52 -07:00
John Reiser 7d09317459 Defend against junk PT_DYNAMIC
https://github.com/upx/upx/issues/390
	modified:   p_lx_elf.cpp
2020-07-23 04:14:34 -07:00
John Reiser 87b73e5cfd Unpack: Phdrs must be within expansion of first compressed block
https://github.com/upx/upx/issues/388
	modified:   p_lx_elf.cpp
2020-07-22 19:34:27 -07:00
John Reiser 4e1ae22a1a DT_HASH chains might be trimmed (64-bit, too)
https://github.com/upx/upx/issues/383
	modified:   p_lx_elf.cpp
2020-06-08 12:37:53 -07:00
John Reiser 7d9c6ace66 DT_HASH chains might be trimmed
https://github.com/upx/upx/issues/383
	modified:   p_lx_elf.cpp
2020-06-07 19:35:49 -07:00
John Reiser 211bbc0d36 Set .b_extra for hdr, especially for Mach-o for 'go'.
https://github.com/upx/upx/issues/222
	modified:   p_unix.cpp
2020-06-06 17:11:32 -07:00
John Reiser 48a961ed0e More DPRINTF debugging
modified:   stub/src/amd64-darwin.macho-main.c
2020-06-06 17:10:53 -07:00
John Reiser 966d670191 Documentation only
modified:   stub/src/amd64-darwin.macho-main.c
2020-06-06 15:32:45 -07:00
John Reiser 066fd9fb37 Merge branch 'devel' into jreiser-macho2 2020-05-30 14:37:44 -07:00
John Reiser 9d79924751 Merge branch 'jreiser-pageholes' into devel 2020-05-30 14:01:01 -07:00
John Reiser 08ca1ae3b6 Sync testsuite checksums for "ELF pageholes" feature
modified:   .github/travis_testsuite_1-expected_sha256sums.sh
2020-05-30 13:56:12 -07:00
John Reiser f07048bff1 De-compress (upx -d) for ELF pageholes
modified:   p_lx_elf.cpp
2020-05-30 13:54:11 -07:00
John Reiser d495f7961f Mach-o LC_SEGMENTs not monotonic in file (__DWARF for 'go')
https://github.com/upx/upx/issues/222  go-1.14 (but not go-1.14.3 ?)
	modified:   ../p_mach.cpp
	modified:   ../p_mach.h
	modified:   ../p_unix.cpp
	modified:   ../p_unix.h
	modified:   ../stub/src/amd64-darwin.macho-main.c

	modified:   ../stub/amd64-darwin.macho-fold.h
	modified:   ../stub/arm.v5a-darwin.macho-fold.h
	modified:   ../stub/arm64-darwin.macho-fold.h
	modified:   ../stub/tmp/amd64-darwin.macho-fold.map
	modified:   ../stub/tmp/arm.v5a-darwin.macho-fold.map
	modified:   ../stub/tmp/arm64-darwin.macho-fold.map
2020-05-30 02:54:09 -07:00
John Reiser 71ef76d905 Merge branch 'devel' of https://github.com/upx/upx into devel 2020-05-28 15:46:23 -07:00
John Reiser ae9b40f5b5 Merge branch 'devel' of https://github.com/upx/upx into jreiser-pageholes 2020-05-28 15:45:46 -07:00
John Reiser 07e24c2c3f use UPX_RSIZE_MAX_MEM
modified:   p_mach.cpp
2020-05-28 15:45:07 -07:00
John Reiser 16b18e9396 workaround: MIPS.r3000 early uClibc forgot memset(,0,) of local array
ldso/ldso/ldso.c: _dl_get_ready_to_run()
    _dl_memset(app_tpnt, 0, sizeof(*app_tpnt));
	modified:   stub/src/mipsel.r3000-linux.elf-fold.S

	modified:   stub/mips.r3000-linux.elf-fold.h
	modified:   stub/mipsel.r3000-linux.elf-fold.h
2020-05-26 14:49:25 -07:00