pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix out-of-memory handling in ecpglib. 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix out-of-memory handling in ecpglib. @ 2020-01-20 00:15 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2020-01-20 00:15 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix out-of-memory handling in ecpglib. ecpg_build_params() would crash on a null pointer dereference if realloc() failed, due to updating the persistent "stmt" struct too aggressively. (Even without the crash, this would've leaked the old storage that we were trying to realloc.) Per Coverity. This seems to have been broken in commit 0cc050794, so back-patch into v12. Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/44f1fc8df5dadbc5e80661660903aab4076d868f Modified Files -------------- src/interfaces/ecpg/ecpglib/execute.c | 37 +++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix out-of-memory handling in ecpglib. @ 2020-01-20 00:15 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2020-01-20 00:15 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix out-of-memory handling in ecpglib. ecpg_build_params() would crash on a null pointer dereference if realloc() failed, due to updating the persistent "stmt" struct too aggressively. (Even without the crash, this would've leaked the old storage that we were trying to realloc.) Per Coverity. This seems to have been broken in commit 0cc050794, so back-patch into v12. Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c7c2cc67007741338a36a8d7aa86e23600aa5e18 Modified Files -------------- src/interfaces/ecpg/ecpglib/execute.c | 37 +++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-01-20 00:15 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-01-20 00:15 pgsql: Fix out-of-memory handling in ecpglib. Tom Lane <tgl@sss.pgh.pa.us> 2020-01-20 00:15 pgsql: Fix out-of-memory handling in ecpglib. 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