From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix out-of-memory handling in ecpglib. |
Date: | 2020-01-20 00:15:23 |
Message-ID: | E1itKix-0002ql-0z@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-01-20 00:18:57 | Re: pgsql: Add a non-strict version of jsonb_set |
Previous Message | Andrew Dunstan | 2020-01-20 00:02:49 | Re: pgsql: Add a non-strict version of jsonb_set |