forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitef9f359
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 parenta5d2337 commitef9f359
2 files changed
+5
-1
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3922 | 3922 |
| |
3923 | 3923 |
| |
3924 | 3924 |
| |
| 3925 | + | |
| 3926 | + | |
3925 | 3927 |
| |
3926 | 3928 |
| |
3927 | 3929 |
| |
| |||
3941 | 3943 |
| |
3942 | 3944 |
| |
3943 | 3945 |
| |
| 3946 | + | |
| 3947 | + | |
3944 | 3948 |
| |
3945 | 3949 |
| |
3946 | 3950 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1938 | 1938 |
| |
1939 | 1939 |
| |
1940 | 1940 |
| |
1941 |
| - | |
| 1941 | + | |
1942 | 1942 |
| |
1943 | 1943 |
| |
1944 | 1944 |
| |
|
0 commit comments
Comments
(0)