src: introduce upx::max and friends; updates for clang-19 git snapshot
This commit is contained in:
+1
-3
@@ -599,8 +599,6 @@ int PackUnix::find_overlay_offset(MemBuffer const &buf)
|
||||
// See notes there.
|
||||
**************************************************************************/
|
||||
|
||||
static unsigned umax(unsigned a, unsigned b) {return (a < b) ? b : a;}
|
||||
|
||||
void PackUnix::unpack(OutputFile *fo)
|
||||
{
|
||||
b_info bhdr;
|
||||
@@ -671,7 +669,7 @@ void PackUnix::unpack(OutputFile *fo)
|
||||
// first flag bits of NRV_d32, the 5-byte info of LZMA, etc.
|
||||
// Fuzzers may try sz_cpr shorter than possible.
|
||||
// Use some OVERHEAD for safety.
|
||||
i = blocksize + OVERHEAD - umax(12, sz_cpr);
|
||||
i = blocksize + OVERHEAD - upx::umax(12u, sz_cpr);
|
||||
if (i < 0)
|
||||
throwCantUnpack("corrupt b_info");
|
||||
fi->readx(buf+i, sz_cpr);
|
||||
|
||||
Reference in New Issue
Block a user