forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8d84dd0
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 parent2401d93 commit8d84dd0
1 file changed
+5
-0
lines changedLines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2974 | 2974 |
| |
2975 | 2975 |
| |
2976 | 2976 |
| |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
2977 | 2982 |
| |
2978 | 2983 |
| |
2979 | 2984 |
| |
|
0 commit comments
Comments
(0)