forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf79bea4
committed
Fix crash in psql when attempting to reuse old connection
In a psql session, if the connection to the server is abruptly cut, thereferenced connection would become NULL as of CheckConnection(). Thiscould cause a hard crash with psql if attempting to connect by reusingthe past connection's data because of a null-pointer dereference witheither PQhost() or PQdb(). This issue is fixed by making sure that noreuse of the past connection is done if it does not exist.Issue has been introduced by6e5f8d4, so backpatch down to 12.Reported-by: Hugh WangAuthor: Michael PaquierReviewed-by: Álvaro Herrera, Tom LaneDiscussion:https://postgr.es/m/16330-b34835d83619e25d@postgresql.orgBackpatch-through: 121 parent6a50f1a commitf79bea4
1 file changed
+5
-0
lines changedLines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2941 | 2941 |
| |
2942 | 2942 |
| |
2943 | 2943 |
| |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
2944 | 2949 |
| |
2945 | 2950 |
| |
2946 | 2951 |
| |
|
0 commit comments
Comments
(0)