pjfanning commented on code in PR #1064:
URL: https://github.com/apache/poi/pull/1064#discussion_r3225133496
##########
poi/src/main/java/org/apache/poi/hpsf/Array.java:
##########
@@ -71,7 +71,12 @@ void read( LittleEndianByteArrayInputStream lei ) {
long getNumberOfScalarValues() {
long result = 1;
for ( ArrayDimension dimension : _dimensions ) {
- result *= dimension._size;
+ try {
+ result = Math.multiplyExact(result, dimension._size);
+ } catch (ArithmeticException e) {
+ throw new IllegalPropertySetDataException(
Review Comment:
why this random unrelated exception type?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]