The current check may fail if the addition overflows. I've observed
failures of macho-invalid.test on 32-bit due to this.
Instead, compare against the remaining bytes until the end of the
object.
(cherry picked from commit 3f29acb51739a3e6bfb8cc623eb37cb734c98a63)