pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Meskes <meskes@postgresql.org>
To: Dudley, Michael <mdudley@gryphonsensors.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14582: ecpg crashes on SQL input
Date: Thu, 09 Mar 2017 15:56:47 +0100
Message-ID: <1489071407.2338.19.camel@postgresql.org> (raw)
In-Reply-To: <MWHPR05MB3486D9AB01252062ABC3694ACD210@MWHPR05MB3486.namprd05.prod.outlook.com>
References: <20170308165659.25059.69634@wrigleys.postgresql.org>
	<1489065869.2338.11.camel@postgresql.org>
	<MWHPR05MB3486D9AB01252062ABC3694ACD210@MWHPR05MB3486.namprd05.prod.outlook.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

> Sure--see attached.
> 
> Luckily enough, copying the SQL from the pgsql-bugs archive
> reproduces the problem as well.

Could you try the attached patch please?

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Attachments:

ecpg.patch (text/x-patch, 472B) download diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l index 6b58dd5afe..7b2bfdccc9 100644 --- a/src/interfaces/ecpg/preproc/pgc.l +++ b/src/interfaces/ecpg/preproc/pgc.l @@ -565,6 +565,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+ { addlit(yytext, yyleng); free(dolqstart); + dolqstart = NULL; BEGIN(SQL); base_yylval.str = mm_strdup(literalbuf); return DOLCONST;

view thread (8+ messages)  latest in thread

Message-ID: <1489071407.2338.19.camel@postgresql.org>
Permalink:  ../1489071407.2338.19.camel@postgresql.org/
Also on:    postgresql.org/message-id/1489071407.2338.19.camel@postgresql.org

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: meskes@postgresql.org, mdudley@gryphonsensors.com
  Subject: Re: BUG #14582: ecpg crashes on SQL input
  In-Reply-To: <1489071407.2338.19.camel@postgresql.org>
  References: <20170308165659.25059.69634@wrigleys.postgresql.org> <1489065869.2338.11.camel@postgresql.org> <MWHPR05MB3486D9AB01252062ABC3694ACD210@MWHPR05MB3486.namprd05.prod.outlook.com> <1489071407.2338.19.camel@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox