[pgpool-committers: 4855] pgpool: Fix accessing already freed data in extended query.
Tatsuo Ishii
ishii at postgresql.org
Fri Jul 13 17:45:01 JST 2018
Fix accessing already freed data in extended query.
When previous_message was set and accessed later on, it looked into
already freed data. This is because read_kind_from_backend() set the
pointer to the previous message in session context, and then released
the memory at the end of the function. No report from fields so far. I
just found this while testing Pgpool-II.
To fix this, store the previous message in the session context, rather
than storing the pointer. Also have a flag in the session context to
indicate whether a previous message is actually stored or not.
All the API for previous message has not been changed.
Branch
------
master
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=45d17b1f1b60d3980b842f4da8d1a3d141db6561
Modified Files
--------------
src/context/pool_session_context.c | 13 +++++++++----
src/include/context/pool_session_context.h | 7 +++++--
2 files changed, 14 insertions(+), 6 deletions(-)
More information about the pgpool-committers
mailing list