You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org> on 2010/07/24 20:12:49 UTC

[jira] Commented: (XERCESJ-1461) Some averaging computations which overflow for large values.

    [ https://issues.apache.org/jira/browse/XERCESJ-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892010#action_12892010 ] 

Michael Glavassevich commented on XERCESJ-1461:
-----------------------------------------------

Specifically "(start + end) / 2" will overflow when the sum of 'start' and 'end' would be greater than Integer.MAX_VALUE.  This is fixed with an unsigned right shift "(start + end) >>> 1".

> Some averaging computations which overflow for large values.
> ------------------------------------------------------------
>
>                 Key: XERCESJ-1461
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1461
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.10.0
>            Reporter: Michael Glavassevich
>            Priority: Minor
>
> Averaging computations in the binary search and divide and conquer methods in DeferredDocumentImpl and BalancedDTDGrammar will overflow for large values. I've already fixes these problems; just opening this now for tracking purposes.

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


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