[tor-commits] [tor/master] buf: use INT_MAX - 1 in checks