1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

get_te64_32() gets 4-bit value, then detects 32-bit overflow

modified:   packer.h
This commit is contained in:
John Reiser 2024-11-25 10:45:54 -08:00
parent a35e50c02a
commit 88cd02d750

View File

@ -309,6 +309,13 @@ protected:
bele->set64(p, v);
}
#endif
template <class T, class = enable_if_te64<T> >
inline upx_uint64_t get_te64_32(const T *p) const {
upx_uint64_t val = get_te64(p);
if (val >> 32)
throwCantPack("64-bit value too big %#llx", val);
return (unsigned)val;
}
protected:
const N_BELE_RTP::AbstractPolicy *bele = nullptr; // TE - Target Endianness