[PATCH] Fix segfault calling PQflush on invalid connection - Mailing list pgsql-bugs

From Daniele Varrazzo
Subject [PATCH] Fix segfault calling PQflush on invalid connection
Date
Msg-id CA+mi_8Zm_mVVyW1iNFgyMd9Oh0Nv8-F+7Y3-BqwMgTMHuo_h2Q@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] Fix segfault calling PQflush on invalid connection
List pgsql-bugs
PQflush calls pqFlush, which performs struct access to the connection
without checking if it's valid, resulting in a segfault if called with
a null pointer.

Please find attached a patch adding a guard to PQflush().

Cheers

-- Daniele

Attachment

pgsql-bugs by date:

Previous
From: "Anton A. Melnikov"
Date:
Subject: [BUG] Crash of logical replica with trigger.
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Fix segfault calling PQflush on invalid connection