From: Apple Date: Fri, 4 Mar 2016 05:57:33 +0000 (+0000) Subject: libutil-47.tar.gz X-Git-Tag: macos-1012^0 X-Git-Url: https://git.saurik.com/apple/libutil.git/commitdiff_plain/1d1fa3c617f9bdf4c36aca4c3bffcdd089fbeb7f libutil-47.tar.gz --- diff --git a/humanize_number.c b/humanize_number.c index b773422..cf0cfc8 100644 --- a/humanize_number.c +++ b/humanize_number.c @@ -133,7 +133,7 @@ humanize_number(char *buf, size_t len, int64_t quotient, if (scale & (HN_AUTOSCALE | HN_GETSCALE)) { /* See if there is additional columns can be used. */ - for (max = 1, i = len - baselen; i-- > 0;) + for (max = 1, i = len - baselen; i-- > 0 && max <= (INT64_MAX / 10);) max *= 10; /*