diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp index a4691e5f..ca1a33d9 100644 --- a/src/p_lx_elf.cpp +++ b/src/p_lx_elf.cpp @@ -194,7 +194,7 @@ void PackLinuxI386elf::packExtent( tmp.b_cto8 = ft->cto; } fo->write(&tmp, sizeof(tmp)); - ph.b_len += sizeof(b_info); + b_len += sizeof(b_info); // write compressed data if (ph.c_len < ph.u_len) { diff --git a/src/p_lx_exc.cpp b/src/p_lx_exc.cpp index de048335..79111379 100644 --- a/src/p_lx_exc.cpp +++ b/src/p_lx_exc.cpp @@ -344,7 +344,7 @@ PackLinuxI386::buildLinuxLoader( // p_progid, p_filesize, p_blocksize sizeof(p_info) + // compressed data - ph.b_len + ph.c_len ); + b_len + ph.c_len ); // entry to stub addLoader("LEXEC000", 0); diff --git a/src/p_unix.cpp b/src/p_unix.cpp index 92fa2428..f56ce82a 100644 --- a/src/p_unix.cpp +++ b/src/p_unix.cpp @@ -181,7 +181,7 @@ void PackUnix::pack2(OutputFile *fo, Filter &ft) blk_info.b_ftid = ph.filter; blk_info.b_cto8 = ph.filter_cto; fo->write(&blk_info, sizeof(blk_info)); - ph.b_len += sizeof(b_info); + b_len += sizeof(b_info); // write compressed data if (ph.c_len < ph.u_len) { @@ -229,7 +229,7 @@ void PackUnix::pack(OutputFile *fo) { Filter ft(ph.level); ft.addvalue = 0; - ph.b_len = 0; + b_len = 0; progid = 0; // set options diff --git a/src/p_unix.h b/src/p_unix.h index 316d5519..d3d6cbf1 100644 --- a/src/p_unix.h +++ b/src/p_unix.h @@ -81,6 +81,8 @@ protected: MemBuffer pt_dynamic; int sz_dynamic; + unsigned b_len; // total length of b_info blocks + // must agree with stub/linux.hh struct b_info { // 12-byte header before each compressed block unsigned sz_unc; // uncompressed_size diff --git a/src/packer.h b/src/packer.h index 16fd0fb5..1bd1f958 100644 --- a/src/packer.h +++ b/src/packer.h @@ -95,9 +95,6 @@ public: // info fields set by Packer::compressWithFilters() unsigned overlap_overhead; - - // FIXME: john, what is this ??? - unsigned b_len; // total length of b_info blocks };