dxbjavid opened a new pull request, #325:
URL: https://github.com/apache/commons-math/pull/325

   SobolSequenceGenerator.initFromStream reads a per-dimension degree `s` from 
the direction-number stream passed to the public `SobolSequenceGenerator(int, 
InputStream)` constructor, then allocates `new int[s + 1]` and writes 
`direction[d][1..s]` even though each `direction[d]` holds only `BITS + 1` 
entries. A line with `s > BITS` throws a raw ArrayIndexOutOfBoundsException and 
`s < 1` throws NegativeArraySizeException, instead of the MathParseException 
this parser uses for every other malformed line. Reject out-of-range `s` before 
the allocation so bad input maps to MathParseException like the surrounding 
token parsing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to