forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd63a691
committed
Add missing bad-PGconn guards in libpq entry points.
There's a convention that externally-visible libpq functions shouldcheck for a NULL PGconn pointer, and fail gracefully instead ofcrashing. PQflush() and PQisnonblocking() didn't get that memothough. Also add a similar check to PQdefaultSSLKeyPassHook_OpenSSL;while it's not clear that ordinary usage could reach that with anull conn pointer, it's cheap enough to check, so let's be consistent.Daniele Varrazzo and Tom LaneDiscussion:https://postgr.es/m/CA+mi_8Zm_mVVyW1iNFgyMd9Oh0Nv8-F+7Y3-BqwMgTMHuo_h2Q@mail.gmail.com1 parent63b64d8 commitd63a691
2 files changed
+5
-1
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3829 | 3829 |
| |
3830 | 3830 |
| |
3831 | 3831 |
| |
| 3832 | + | |
| 3833 | + | |
3832 | 3834 |
| |
3833 | 3835 |
| |
3834 | 3836 |
| |
| |||
3848 | 3850 |
| |
3849 | 3851 |
| |
3850 | 3852 |
| |
| 3853 | + | |
| 3854 | + | |
3851 | 3855 |
| |
3852 | 3856 |
| |
3853 | 3857 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1806 | 1806 |
| |
1807 | 1807 |
| |
1808 | 1808 |
| |
1809 |
| - | |
| 1809 | + | |
1810 | 1810 |
| |
1811 | 1811 |
| |
1812 | 1812 |
| |
|
0 commit comments
Comments
(0)