Re: [HACKERS] [bug fix] Trivial ecpg bug which can cause memory overrun

2016-12-21 Thread Michael Meskes
Hi,

> While investigating some other issue, we found a trivial bug of
> ecpg.  The attached is a fix for that.
> ...

Thanks for spotting and fixing. Committed.

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-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] [bug fix] Trivial ecpg bug which can cause memory overrun

2016-12-21 Thread Tsunakawa, Takayuki
Hello,

While investigating some other issue, we found a trivial bug of ecpg.  The 
attached is a fix for that.

If you specify an input file which ends with "." (e.g. run "ecpg file."), ecpg 
writes one byte past the end of the allocated memory.

In addition, the following statement is misleading.  Some people may think that 
file.ec.c will be converted to a.ec.c.  But the actual behavior is that it is 
converted to file.c.  So I clarified the paragraph a bit.

"If the extension of the input file is not .pgc, then the output file name is 
computed by appending .c to the full file name."

Regards
Takayuki Tsunakawa



ecpg_outfile.patch
Description: ecpg_outfile.patch

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