From owner-cvs-src-old@FreeBSD.ORG Fri Apr 22 00:32:35 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AF6B106564A for ; Fri, 22 Apr 2011 00:32:35 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 474B58FC15 for ; Fri, 22 Apr 2011 00:32:35 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p3M0WZ3s000201 for ; Fri, 22 Apr 2011 00:32:35 GMT (envelope-from delphij@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p3M0WZ5E000200 for cvs-src-old@freebsd.org; Fri, 22 Apr 2011 00:32:35 GMT (envelope-from delphij@repoman.freebsd.org) Message-Id: <201104220032.p3M0WZ5E000200@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to delphij@repoman.freebsd.org using -f From: Xin LI Date: Fri, 22 Apr 2011 00:32:16 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_7 Subject: cvs commit: src/lib/libutil humanize_number.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2011 00:32:35 -0000 delphij 2011-04-22 00:32:16 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) lib/libutil humanize_number.c Log: SVN rev 220934 on 2011-04-22 00:32:16Z by delphij MFC r219939: humanize_number(3) multiply the input number by 100, which could cause an integer overflow when the input is very large (for example, 100 Pi would become about 10 Ei which exceeded signed int64_t). Solve this issue by splitting the division into two parts and avoid the multiplication. PR: bin/146205 Reviewed by: arundel Revision Changes Path 1.2.10.2 +24 -16 src/lib/libutil/humanize_number.c