harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulex Yang (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-5088) [classlib][math] BigInteger(int numBits, Random rnd) constructor contains overflow
Date Thu, 15 Nov 2007 06:57:43 GMT

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

Paulex Yang resolved HARMONY-5088.
----------------------------------

    Resolution: Won't Fix
      Assignee: Paulex Yang

Imran, the overflow causes NegativeArraySizeException thrown, which complies with RI's behavior.
Please refer to tests.api.java.math.BigIntegerTest.test_ConstructorILjava_util_Random() for
details. Let me know if the resolution is not satisfied, thanks.


> [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