src: some xspan cleanups

This commit is contained in:
Markus F.X.J. Oberhumer
2023-01-30 11:03:11 +01:00
parent 43b6ff29e3
commit 0653bb5a72
9 changed files with 43 additions and 41 deletions
+3 -3
View File
@@ -282,9 +282,9 @@ void PackTmt::unpack(OutputFile *fo) {
decompress(ibuf, obuf);
// decode relocations
const unsigned osize = ph.u_len - get_le32(obuf + ph.u_len - 4);
const unsigned osize = ph.u_len - get_le32(obuf + (ph.u_len - 4));
SPAN_P_VAR(upx_byte, relocs, obuf + osize);
const unsigned origstart = get_le32(obuf + ph.u_len - 8);
const unsigned origstart = get_le32(obuf + (ph.u_len - 8));
// unfilter
if (ph.filter) {
@@ -292,7 +292,7 @@ void PackTmt::unpack(OutputFile *fo) {
ft.init(ph.filter, 0);
ft.cto = (unsigned char) ph.filter_cto;
if (ph.version < 11)
ft.cto = (unsigned char) (get_le32(obuf + ph.u_len - 12) >> 24);
ft.cto = (unsigned char) (get_le32(obuf + (ph.u_len - 12)) >> 24);
ft.unfilter(obuf, ptr_udiff_bytes(relocs, obuf));
}