We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f1c574 commit 6a32cf3Copy full SHA for 6a32cf3
icu4c/source/i18n/nfsubs.cpp
@@ -1343,10 +1343,18 @@ NumeratorSubstitution::doParse(const UnicodeString& text,
1343
int64_t n = result.getLong(status); // force conversion!
1344
int64_t d = 1;
1345
while (d <= n) {
1346
+ if (d > U_INT64_MAX / 10) {
1347
+ // Will cause int64_t overflow
1348
+ return false;
1349
+ }
1350
d *= 10;
1351
}
1352
// now add the zeros
1353
while (zeroCount > 0) {
1354
1355
1356
1357
1358
1359
--zeroCount;
1360
0 commit comments