pgsql: Fix handling of array of char pointers in ecpglib. - Mailing list pgsql-committers

From Michael Meskes
Subject pgsql: Fix handling of array of char pointers in ecpglib.
Date
Msg-id E1Whda9-0004AQ-3W@gemulon.postgresql.org
Whole thread Raw
List 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.bapat@enterprisedb.com>

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/b4eeb9d58ec9237a3f2a9d6c5b1d4374beb2e675

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(-)


pgsql-committers by date:

Previous
From: Michael Meskes
Date:
Subject: pgsql: Fix handling of array of char pointers in ecpglib.
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix use of free in walsender error handling after a sysid mismat