pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Add missing bad-PGconn guards in libpq entry points. 7+ messages / 1 participants [nested] [flat]
* pgsql: Add missing bad-PGconn guards in libpq entry points. @ 2022-08-15 19:40 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2022-08-15 19:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Add missing bad-PGconn guards in libpq entry points. There's a convention that externally-visible libpq functions should check for a NULL PGconn pointer, and fail gracefully instead of crashing. PQflush() and PQisnonblocking() didn't get that memo though. Also add a similar check to PQdefaultSSLKeyPassHook_OpenSSL; while it's not clear that ordinary usage could reach that with a null conn pointer, it's cheap enough to check, so let's be consistent. Daniele Varrazzo and Tom Lane Discussion: https://postgr.es/m/CA+mi_8Zm_mVVyW1iNFgyMd9Oh0Nv8-F+7Y3-BqwMgTMHuo_h2Q@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/bb9237a1295a29c4e41b97f9d34e3922ac69c071 Modified Files -------------- src/interfaces/libpq/fe-exec.c | 4 ++++ src/interfaces/libpq/fe-secure-openssl.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Add missing bad-PGconn guards in libpq entry points. @ 2022-08-15 19:40 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2022-08-15 19:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Add missing bad-PGconn guards in libpq entry points. There's a convention that externally-visible libpq functions should check for a NULL PGconn pointer, and fail gracefully instead of crashing. PQflush() and PQisnonblocking() didn't get that memo though. Also add a similar check to PQdefaultSSLKeyPassHook_OpenSSL; while it's not clear that ordinary usage could reach that with a null conn pointer, it's cheap enough to check, so let's be consistent. Daniele Varrazzo and Tom Lane Discussion: https://postgr.es/m/CA+mi_8Zm_mVVyW1iNFgyMd9Oh0Nv8-F+7Y3-BqwMgTMHuo_h2Q@mail.gmail.com Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ef9f35964dea10d522fdb3aadef3e92f50b03d1c Modified Files -------------- src/interfaces/libpq/fe-exec.c | 4 ++++ src/interfaces/libpq/fe-secure-openssl.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Add missing bad-PGconn guards in libpq entry points. @ 2022-08-15 19:40 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2022-08-15 19:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Add missing bad-PGconn guards in libpq entry points. There's a convention that externally-visible libpq functions should check for a NULL PGconn pointer, and fail gracefully instead of crashing. PQflush() and PQisnonblocking() didn't get that memo though. Also add a similar check to PQdefaultSSLKeyPassHook_OpenSSL; while it's not clear that ordinary usage could reach that with a null conn pointer, it's cheap enough to check, so let's be consistent. Daniele Varrazzo and Tom Lane Discussion: https://postgr.es/m/CA+mi_8Zm_mVVyW1iNFgyMd9Oh0Nv8-F+7Y3-BqwMgTMHuo_h2Q@mail.gmail.com Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d63a69157d189bf3d56eb5ad37fa67d0134bfb31 Modified Files -------------- src/interfaces/libpq/fe-exec.c | 4 ++++ src/interfaces/libpq/fe-secure-openssl.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Add missing bad-PGconn guards in libpq entry points. @ 2022-08-15 19:40 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2022-08-15 19:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Add missing bad-PGconn guards in libpq entry points. There's a convention that externally-visible libpq functions should check for a NULL PGconn pointer, and fail gracefully instead of crashing. PQflush() and PQisnonblocking() didn't get that memo though. Also add a similar check to PQdefaultSSLKeyPassHook_OpenSSL; while it's not clear that ordinary usage could reach that with a null conn pointer, it's cheap enough to check, so let's be consistent. Daniele Varrazzo and Tom Lane Discussion: https://postgr.es/m/CA+mi_8Zm_mVVyW1iNFgyMd9Oh0Nv8-F+7Y3-BqwMgTMHuo_h2Q@mail.gmail.com Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e37e9a65517552e79614a1c81c8aff216d033e59 Modified Files -------------- src/interfaces/libpq/fe-exec.c | 4 ++++ src/interfaces/libpq/fe-secure-openssl.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Add missing bad-PGconn guards in libpq entry points. @ 2022-08-15 19:40 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2022-08-15 19:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Add missing bad-PGconn guards in libpq entry points. There's a convention that externally-visible libpq functions should check for a NULL PGconn pointer, and fail gracefully instead of crashing. PQflush() and PQisnonblocking() didn't get that memo though. Also add a similar check to PQdefaultSSLKeyPassHook_OpenSSL; while it's not clear that ordinary usage could reach that with a null conn pointer, it's cheap enough to check, so let's be consistent. Daniele Varrazzo and Tom Lane Discussion: https://postgr.es/m/CA+mi_8Zm_mVVyW1iNFgyMd9Oh0Nv8-F+7Y3-BqwMgTMHuo_h2Q@mail.gmail.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c19024d74e98e5c0ad95643ce584c52954d01b70 Modified Files -------------- src/interfaces/libpq/fe-exec.c | 4 ++++ 1 file changed, 4 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Add missing bad-PGconn guards in libpq entry points. @ 2022-08-15 19:40 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2022-08-15 19:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Add missing bad-PGconn guards in libpq entry points. There's a convention that externally-visible libpq functions should check for a NULL PGconn pointer, and fail gracefully instead of crashing. PQflush() and PQisnonblocking() didn't get that memo though. Also add a similar check to PQdefaultSSLKeyPassHook_OpenSSL; while it's not clear that ordinary usage could reach that with a null conn pointer, it's cheap enough to check, so let's be consistent. Daniele Varrazzo and Tom Lane Discussion: https://postgr.es/m/CA+mi_8Zm_mVVyW1iNFgyMd9Oh0Nv8-F+7Y3-BqwMgTMHuo_h2Q@mail.gmail.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ee4a17e200b72286c3a02cf6c572836652df2541 Modified Files -------------- src/interfaces/libpq/fe-exec.c | 4 ++++ 1 file changed, 4 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Add missing bad-PGconn guards in libpq entry points. @ 2022-08-15 19:40 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2022-08-15 19:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Add missing bad-PGconn guards in libpq entry points. There's a convention that externally-visible libpq functions should check for a NULL PGconn pointer, and fail gracefully instead of crashing. PQflush() and PQisnonblocking() didn't get that memo though. Also add a similar check to PQdefaultSSLKeyPassHook_OpenSSL; while it's not clear that ordinary usage could reach that with a null conn pointer, it's cheap enough to check, so let's be consistent. Daniele Varrazzo and Tom Lane Discussion: https://postgr.es/m/CA+mi_8Zm_mVVyW1iNFgyMd9Oh0Nv8-F+7Y3-BqwMgTMHuo_h2Q@mail.gmail.com Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2a280832e1d0d79bfcaf7f394d9ead6880985032 Modified Files -------------- src/interfaces/libpq/fe-exec.c | 4 ++++ 1 file changed, 4 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2022-08-15 19:40 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-08-15 19:40 pgsql: Add missing bad-PGconn guards in libpq entry points. Tom Lane <tgl@sss.pgh.pa.us> 2022-08-15 19:40 pgsql: Add missing bad-PGconn guards in libpq entry points. Tom Lane <tgl@sss.pgh.pa.us> 2022-08-15 19:40 pgsql: Add missing bad-PGconn guards in libpq entry points. Tom Lane <tgl@sss.pgh.pa.us> 2022-08-15 19:40 pgsql: Add missing bad-PGconn guards in libpq entry points. Tom Lane <tgl@sss.pgh.pa.us> 2022-08-15 19:40 pgsql: Add missing bad-PGconn guards in libpq entry points. Tom Lane <tgl@sss.pgh.pa.us> 2022-08-15 19:40 pgsql: Add missing bad-PGconn guards in libpq entry points. Tom Lane <tgl@sss.pgh.pa.us> 2022-08-15 19:40 pgsql: Add missing bad-PGconn guards in libpq entry points. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox