Commit Graph

94 Commits

Author SHA1 Message Date
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 90fc018295 Avoid sigsegv after "patchelf --set-rpath"
https://github.com/upx/upx/issues/47
Enhancement not yet implemented: non-adjacent ElfXX_Ehdr and ElfXX_Phdr.
	modified:   p_unix.cpp
2017-01-29 14:01:56 +01:00
Markus F.X.J. Oberhumer c4da5e81fa Welcome 2017. 2017-01-03 12:02:07 +01:00
Markus F.X.J. Oberhumer ed900b0476 More thorough use of O_BINARY. 2016-10-07 15:04:12 +02:00
Markus F.X.J. Oberhumer f7554374ab Update email address. 2016-09-28 12:25:01 +02:00
Markus F.X.J. Oberhumer 83828aa8a3 Update vim modelines. 2016-09-22 17:29:43 +02:00
Markus F.X.J. Oberhumer 96d9968db5 Welcome 2016. 2016-09-22 14:07:14 +02:00
Markus F.X.J. Oberhumer b3121e4534 Use upx_uint16_t instead of unsigned short. 2016-09-21 17:40:11 +02: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
John Reiser 2238c99b61 another check on b_info in ::unpackExtent() 2015-05-16 15:18:28 -07:00
John Reiser a8a3caed1c Check blocksize 2015-05-09 20:29:56 -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 2a79a69f59 PackUnix::unpack() is non-Elf. CERT-FI 829767
id:000057,sig:11,sync:upx-macho-crash-2,src:000108
id:000058,sig:11,sync:upx-macho-crash-2,src:000107
id:000059,sig:06,sync:upx-macho-crash-2,src:000106
id:000060,sig:06,sync:upx-macho-crash-2,src:000103
2015-05-09 05:14:12 -07: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
Markus F.X.J. Oberhumer 36dd35f238 Silence some compilation warnings. 2013-02-18 11:01:30 +01:00
Markus F.X.J. Oberhumer 87a368a857 Welcome 2013. 2013-02-12 10:14:03 +01:00
John Reiser 89830a5ae0 Mac OS X codesign disallows overhang of vmsize. 2013-01-25 15:58:25 -08:00
John Reiser 1579182ed9 PackUnix::canUnpack() allows zero-filled last page 2012-08-03 13:19:28 -07:00
John Reiser 8a5d352733 Portability: fix "EOFException: premature end of file" doing ELF on Windows.
OutputFile::read() was bad news; fsync() should work, but was missing.
2012-07-12 14:25:28 -07:00
John Reiser f383629282 compressWithFilters(..., inhibit_compression_check=0) // SourceForge bug 3541020
Not good to check compression ratio on every block when blocksize < file_size,
as when --force_execve of Elf > 0x80000 bytes.
2012-07-12 07:04:56 -07:00
Markus F.X.J. Oberhumer 43ce34d547 Welcome 2012. 2012-01-01 22:35:11 +01:00
John Reiser 54618064a1 l_info.l_lsize and .l_checksum are TargetEndian 2011-03-28 10:14:06 -07:00
Markus F.X.J. Oberhumer 9bf2b79d9e Enter 2011. 2011-01-03 08:49:23 +01:00
Markus F.X.J. Oberhumer 6bc3197721 Enter 2010. 2010-02-06 17:15:49 +01:00
John Reiser 405abc4e95 ::packExtent updates ph.u_adler to satisfy verifyOverlappingDecompression()
even when 0==hdr_u_len
2009-10-14 17:47:02 -07:00
Markus F.X.J. Oberhumer 5ed689ceb0 Enter 2009. 2008-12-31 17:07:18 +01:00
Markus F.X.J. Oberhumer 7f9c47176a Introduce target endianness accessors get_teXX() and set_teXX() in packer.h to
replace all [gs]et_nativeXX() member functions.
2008-01-09 13:57:47 +01:00
Markus F.X.J. Oberhumer 6ff1bd5917 Update my email address. 2008-01-02 10:12:42 +01:00
Markus F.X.J. Oberhumer fa49dbe2cb Enter 2008. 2008-01-02 09:42:31 +01:00
Markus F.X.J. Oberhumer 2c67875781 Pass and verify original data in all xxx_test_overlap() functions. 2007-04-26 16:15:49 +02:00
John Reiser 76950d56b9 PackUnix::canPack allow incompressible extents in getPackHeader() 2007-04-25 09:18:31 -07:00
Markus F.X.J. Oberhumer 5e83596a1b Enter 2007. 2007-01-14 13:08:58 +01:00
Markus F.X.J. Oberhumer f2b9dff596 More work so that watom/le now uses compressWithFilters(). 2006-12-06 11:08:32 +01:00
Markus F.X.J. Oberhumer ae945ed315 Clean up help and avoid using backticks as quoting chars. 2006-12-06 08:11:55 +01:00
Markus F.X.J. Oberhumer 8875470b37 Refactored compressWithFilters(). 2006-12-06 07:27:23 +01:00
John Reiser 579ce20cad remove patchFilter32() 2006-08-22 20:49:28 -07:00
John Reiser 30a4adf331 Reduce usage of patchDecompressor() 2006-08-21 21:19:48 -07:00
Markus F.X.J. Oberhumer 66df7389d2 Refactoring: pass upx_compress_config_t to Packer::compressWithFilters()
so that formats can set conf_lzma.max_num_probs.

Also renamed compression parameters to use cconf & cresult.
2006-06-29 06:15:28 +02:00
Markus F.X.J. Oberhumer bf5cbfffc2 Start major refactoring. 2006-06-19 19:20:50 +02:00
Markus F.X.J. Oberhumer db43910288 Enter 2006. 2006-06-16 15:17:29 +02:00
Markus F.X.J. Oberhumer d8748f4270 Introduced MemBuffer::getSizeForCompression(). 2006-06-12 13:18:55 +02:00
Markus F.X.J. Oberhumer d461b53235 Renamed variable clen to c_len and ulen to u_len. 2006-06-11 12:13:37 +02:00
Markus F.X.J. Oberhumer c3ee14eb67 Introduced upx_compress_result_t. 2006-06-11 12:09:25 +02:00
László Molnár 0ca8ae17d4 updated my email address 2006-05-17 21:05:46 +02:00
John Reiser 4aa2d14fe3 acknowledge unused results to avoid compiler warnings treated as errors
committer: jreiser <jreiser> 1141326721 +0000
2006-03-02 19:12:01 +00:00
John Reiser af7de75ad4 Allow unfilter when verifyOverlappingDecompression, for convenience
in end-to-end checksum.
	packer.h packer.cpp p_unix.cpp

committer: jreiser <jreiser> 1141252960 +0000
2006-03-01 22:42:40 +00:00
John Reiser d461ebbda1 fix packExtent checksums and lengths (of uncompressed data) for 0!=hdr_ulen
committer: jreiser <jreiser> 1141241763 +0000
2006-03-01 19:36:03 +00:00
John Reiser 268e322e1c Extra parameter for compressWithFilters and packExtent,
to fix 2-pass problem with --brute on linux/elf386.
Only one decompression method is allowed, chosen by
smallest output for .text; but Elf headers come first.
	packer.cpp packer.h p_unix.cpp p_unix.h p_lx_elf.cpp

committer: jreiser <jreiser> 1140241030 +0000
2006-02-18 05:37:10 +00:00
John Reiser 664a82e7c9 Start re-organizing the packing of Elf, by making Elf32 come first,
with Big endian and Little endian derived from it.
I386 still uses the old way, but PowerPC (both Linux and Darwin [Mac])
use the new way.
	p_elf.h p_lx_elf.cpp p_lx_elf.h p_lx_exc.cpp p_lx_exc.h
	p_unix.cpp p_unix.h p_vmlinx.cpp p_vmlinx.h p_vmlinz.cpp

committer: jreiser <jreiser> 1108940224 +0000
2005-02-20 22:57:04 +00:00