From d6c75f855dad02aeb5e6a4aab5278a2340f70f80 Mon Sep 17 00:00:00 2001 From: Gabor X Toth <*@tg-x.net> Date: Wed, 12 Oct 2016 19:58:22 +0000 Subject: pq: fix crash in clean_varsize_blob() after extracting NULL value --- src/pq/pq_result_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c index 78a375060..180c5fc18 100644 --- a/src/pq/pq_result_helper.c +++ b/src/pq/pq_result_helper.c @@ -70,6 +70,9 @@ extract_varsize_blob (void *cls, void *idst; int fnum; + *dst_size = 0; + *((void **) dst) = NULL; + fnum = PQfnumber (result, fname); if (fnum < 0) -- cgit v1.2.3