I'm not a fan of removing the existing overflow checks, because malloc security depends on a very robust logic, and we already have a macro that detects too-large allocations. Also, your code does not allow allocations up to PTRDIFF_MAX, but to some number smaller than that.