Return-Path: Delivered-To: apmail-xmlgraphics-batik-dev-archive@www.apache.org Received: (qmail 47151 invoked from network); 19 Jun 2006 20:14:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Jun 2006 20:14:10 -0000 Received: (qmail 40270 invoked by uid 500); 19 Jun 2006 20:14:10 -0000 Delivered-To: apmail-xmlgraphics-batik-dev-archive@xmlgraphics.apache.org Received: (qmail 40239 invoked by uid 500); 19 Jun 2006 20:14:09 -0000 Mailing-List: contact batik-dev-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: batik-dev@xmlgraphics.apache.org Delivered-To: mailing list batik-dev@xmlgraphics.apache.org Received: (qmail 40227 invoked by uid 99); 19 Jun 2006 20:14:09 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jun 2006 13:14:09 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jun 2006 13:14:08 -0700 Received: by brutus.apache.org (Postfix, from userid 33) id 15FB7410005; Mon, 19 Jun 2006 20:12:46 +0000 (GMT) From: bugzilla@apache.org To: batik-dev@xmlgraphics.apache.org Subject: DO NOT REPLY [Bug 39838] New: - patches to prevent integer overflow Message-ID: X-Bugzilla-Reason: AssignedTo Date: Mon, 19 Jun 2006 20:12:46 +0000 (GMT) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39838 Summary: patches to prevent integer overflow Product: Batik Version: 1.6 Platform: All OS/Version: All Status: NEW Severity: minor Priority: P2 Component: Utilities AssignedTo: batik-dev@xmlgraphics.apache.org ReportedBy: info@dvholten.de after the recent 'buhei' about the buggy binary search in the jdk (see javalobby.org i decided to check the batik-source for similar 'sleepers'. I dont think that this is an urgent work to prevent immediate problems, but... someone stepped on the that bug and reported in sun's bugbase. If a problem is so easy to wipe out, it should be done. The problem with binary search and those i fixed in the attached patches is something like this: mid = (low + high) / 2; // java.util or // in batik newSize = ( size * 3 ) >> 2; // that is: (size * 3) / 4 = 0.75 the intermediate result of ( size * 3) may overflow to negative and causing problems later on. The cure is to rewrite the expression in an 'overflow-avoiding' way: newSize = ( size - ( size >> 2 )); // that is ( size - size/4) = 0.75 -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org