harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5088) [classlib][math] BigInteger(int numBits, Random rnd) constructor contains overflow
Date Thu, 22 Nov 2007 09:39:43 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12544743
] 

Tim Ellison commented on HARMONY-5088:
--------------------------------------

Why would you do that Paulex?  Seems that the correct behaviour would be as described in Imran's
last comment (i.e. no Neg array exception, and a NPE if rnd is null).

I suggest it is fixed in both 5.0 and 6.0 streams.


> [classlib][math] BigInteger(int numBits, Random rnd)  constructor contains overflow
> -----------------------------------------------------------------------------------
>
>                 Key: HARMONY-5088
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5088
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Imran Ghory
>            Assignee: Paulex Yang
>
> If numBits = Integer.MAX_VALUE then you have an integer overflow situation on the following
lines:
> numberLength = (numBits + 31) >> 5;
> digits = new int[numberLength];

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message