xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: DO NOT REPLY [Bug 39838] New: - patches to prevent integer overflow
Date Tue, 20 Jun 2006 08:12:05 GMT
Dieter,

you are now a committer in Batik. You can apply these changes yourself
if you think they don't need to be discussed (commit-review). The
approach you've chosen is only necessary if you have a change that could
be subject for discussion (review-commit).

If you have trouble with write-access to the SVN repository or need to
know about anything else, please don't hesitate to ask. This project
lives not only from code contributions but also from one helping the
other. And many other things, of course... :-)

New committers guide:
http://www.apache.org/dev/new-committers-guide.html

You now have new privileges in this project. Use them to help improve
Batik.

On 19.06.2006 22:12:46 bugzilla wrote:
> DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
> RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
> <http://issues.apache.org/bugzilla/show_bug.cgi?id=39838>.
> 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.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


Mime
View raw message