forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd8b3c81
committed
Refine memory allocation in ICU conversions
The simple calculations done to estimate the size of the output buffersfor ucnv_fromUChars() and ucnv_toUChars() could overflow int32_t forlarge strings. To avoid that, go the long way and run the functionfirst without an output buffer to get the correct output buffer sizerequirement.1 parentb0f069d commitd8b3c81
1 file changed
+20
-4
lines changedLines changed: 20 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1511 | 1511 |
| |
1512 | 1512 |
| |
1513 | 1513 |
| |
1514 |
| - | |
1515 |
| - | |
1516 | 1514 |
| |
1517 |
| - | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
1518 | 1525 |
| |
1519 | 1526 |
| |
1520 | 1527 |
| |
1521 | 1528 |
| |
| 1529 | + | |
1522 | 1530 |
| |
1523 | 1531 |
| |
1524 | 1532 |
| |
| |||
1541 | 1549 |
| |
1542 | 1550 |
| |
1543 | 1551 |
| |
1544 |
| - | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
1545 | 1559 |
| |
| 1560 | + | |
1546 | 1561 |
| |
1547 | 1562 |
| |
1548 | 1563 |
| |
1549 | 1564 |
| |
1550 | 1565 |
| |
1551 | 1566 |
| |
| 1567 | + | |
1552 | 1568 |
| |
1553 | 1569 |
| |
1554 | 1570 |
| |
|
0 commit comments
Comments
(0)