pq: fix crash in clean_varsize_blob() after extracting NULL value
authorGabor X Toth <*@tg-x.net>
Wed, 12 Oct 2016 19:58:22 +0000 (19:58 +0000)
committerGabor X Toth <*@tg-x.net>
Wed, 12 Oct 2016 19:58:22 +0000 (19:58 +0000)
src/pq/pq_result_helper.c

index 78a3750602904e93ad28b3f0c6168e2bf530501b..180c5fc187a28bd1891d91d12a81eec802b60c3b 100644 (file)
@@ -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)