Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5d08000

Browse files
committed
Correctly copy the target host identification in PQcancelCreate.
PQcancelCreate failed to copy struct pg_conn_host's "type" field,instead leaving it zero (a/k/a CHT_HOST_NAME). This seeminglyhas no great ill effects if it should have been CHT_UNIX_SOCKETinstead, but if it should have been CHT_HOST_ADDRESS then anull-pointer dereference will occur when the cancelConn is used.Bug: #18974Reported-by: Maxim Boguk <maxim.boguk@gmail.com>Author: Sergei Kornilov <sk@zsrv.org>Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/18974-575f02b2168b36b3@postgresql.orgBackpatch-through: 17
1 parent4938737 commit5d08000

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎src/interfaces/libpq/fe-cancel.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ PQcancelCreate(PGconn *conn)
137137
gotooom_error;
138138

139139
originalHost=conn->connhost[conn->whichhost];
140+
cancelConn->connhost[0].type=originalHost.type;
140141
if (originalHost.host)
141142
{
142143
cancelConn->connhost[0].host=strdup(originalHost.host);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp