You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2007/11/28 09:43:43 UTC
[jira] Updated: (HARMONY-5088) [classlib][math] BigInteger(int
numBits, Random rnd) constructor contains overflow
[ https://issues.apache.org/jira/browse/HARMONY-5088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paulex Yang updated HARMONY-5088:
---------------------------------
Attachment: HARMONY-5088.diff
I preferred to leave the difference alone and make both NPE and OOME are accepttable(refer to attached patch for details). How do you think?
> [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
> Attachments: HARMONY-5088.diff
>
>
> 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.