Pass and verify original data in all xxx_test_overlap() functions.

This commit is contained in:
Markus F.X.J. Oberhumer
2007-04-26 16:15:49 +02:00
parent c96e8a8c19
commit 2c67875781
13 changed files with 100 additions and 93 deletions
+6 -2
View File
@@ -173,8 +173,10 @@ void PackUnix::pack2(OutputFile *fo, Filter &ft)
compressWithFilters(&ft, OVERHEAD, NULL_cconf, filter_strategy);
if (ph.c_len < ph.u_len) {
const upx_bytep tbuf = NULL;
if (ft.id == 0) tbuf = ibuf;
ph.overlap_overhead = OVERHEAD;
if (!testOverlappingDecompression(obuf, ph.overlap_overhead)) {
if (!testOverlappingDecompression(obuf, tbuf, ph.overlap_overhead)) {
// not in-place compressible
ph.c_len = ph.u_len;
}
@@ -353,8 +355,10 @@ void PackUnix::packExtent(
}
if (ph.c_len < ph.u_len) {
const upx_bytep tbuf = NULL;
if (ft == NULL || ft->id == 0) tbuf = ibuf;
ph.overlap_overhead = OVERHEAD;
if (!testOverlappingDecompression(obuf, ph.overlap_overhead)) {
if (!testOverlappingDecompression(obuf, tbuf, ph.overlap_overhead)) {
// not in-place compressible
ph.c_len = ph.u_len;
}