Implement real upx_lzma_test_overlap().

Also make Packer::findOverlapOverhead() more pessimistic in worst case.
This commit is contained in:
John Reiser
2007-04-25 16:11:33 -07:00
parent 6ce71e6694
commit 465307655b
2 changed files with 22 additions and 13 deletions
+1 -1
View File
@@ -481,7 +481,7 @@ unsigned Packer::findOverlapOverhead(const upx_bytep buf,
// prepare to deal with very pessimistic values
unsigned low = 1;
unsigned high = UPX_MIN(ph.u_len / 4 + 512, upper_limit);
unsigned high = UPX_MIN(ph.u_len + 512, upper_limit);
// but be optimistic for first try (speedup)
unsigned m = UPX_MIN(16u, high);
//