forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4f4061b
committed
Fix parsing of integer values for connection parameters in libpq
Commite7a2217 has introduced stricter checks for integer values inconnection parameters for libpq. However this failed to correctly checkafter trailing whitespaces, while leading whitespaces were discarded perthe use of strtol(3). This fixes and refactors the parsing logic tohandle both cases consistently. Note that trying to restrict the use oftrailing whitespaces can easily break connection strings like in ECPGregression tests (these have allowed me to catch the parsing bug withconnect_timeout).Author: Michael PaquierReviewed-by: Lars KanisDiscussion:https://postgr.es/m/a9b4cbd7-4ecb-06b2-ebd7-1739bbff3217@greiz-reinsdorf.deBackpatch-through: 121 parentea9e06a commit4f4061b
1 file changed
+23
-6
lines changedLines changed: 23 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1687 | 1687 |
| |
1688 | 1688 |
| |
1689 | 1689 |
| |
1690 |
| - | |
| 1690 | + | |
1691 | 1691 |
| |
1692 | 1692 |
| |
1693 | 1693 |
| |
| |||
1698 | 1698 |
| |
1699 | 1699 |
| |
1700 | 1700 |
| |
| 1701 | + | |
1701 | 1702 |
| |
1702 | 1703 |
| |
1703 |
| - | |
1704 |
| - | |
1705 |
| - | |
1706 |
| - | |
1707 |
| - | |
1708 | 1704 |
| |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
1709 | 1726 |
| |
1710 | 1727 |
| |
1711 | 1728 |
| |
|
0 commit comments
Comments
(0)