File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1- // © 2016 and later: Unicode, Inc. and others.
1+ /) / © 2016 and later: Unicode, Inc. and others.
22// License & terms of use: http://www.unicode.org/copyright.html
33/*
44******************************************************************************
@@ -1343,10 +1343,18 @@ NumeratorSubstitution::doParse(const UnicodeString& text,
13431343 int64_t n = result.getLong (status); // force conversion!
13441344 int64_t d = 1 ;
13451345 while (d <= n) {
1346+ if (d > U_INT64_MAX / 10 ) {
1347+ // Will cause int64_t overflow
1348+ return false ;
1349+ }
13461350 d *= 10 ;
13471351 }
13481352 // now add the zeros
13491353 while (zeroCount > 0 ) {
1354+ if (d > U_INT64_MAX / 10 ) {
1355+ // Will cause int64_t overflow
1356+ return false ;
1357+ }
13501358 d *= 10 ;
13511359 --zeroCount;
13521360 }
You can’t perform that action at this time.
0 commit comments