pgsql: Fix handling of array of char pointers in ecpglib.

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix handling of array of char pointers in ecpglib.
Date: 2014-05-06 11:30:45
Message-ID: E1Whda9-0004AT-54@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix handling of array of char pointers in ecpglib.

When array of char * was used as target for a FETCH statement returning more
than one row, it tried to store all the result in the first element. Instead it
should dump array of char pointers with right offset, use the address instead
of the value of the C variable while reading the array and treat such variable
as char **, instead of char * for pointer arithmetic.

Patch by Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/3a024c1104248a444caab5fa11b4442a1587a90b

Modified Files
--------------
src/interfaces/ecpg/ecpglib/data.c | 8 ++++++++
src/interfaces/ecpg/ecpglib/execute.c | 9 ++++++++-
src/interfaces/ecpg/preproc/type.c | 17 +++++++++++++++--
3 files changed, 31 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-05-06 12:18:33 pgsql: Fix use of free in walsender error handling after a sysid mismat
Previous Message Michael Meskes 2014-05-06 11:30:44 pgsql: Fix handling of array of char pointers in ecpglib.