Lists: | pgsql-hackers |
---|
From: | Boszormenyi Zoltan <zb(at)cybertec(dot)at> |
---|---|
To: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Michael Meskes <meskes(at)postgresql(dot)org> |
Cc: | Hans-Juergen Schoenig <hs(at)cybertec(dot)at> |
Subject: | ECPG: store own copy of the prepared statement name |
Date: | 2009-10-14 16:37:43 |
Message-ID: | 4AD5FE57.2000707@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi,
the attached patch makes ECPG more robust
against applications that free() strings by storing
its own copy of the prepared statement name.
Best regards,
Zoltán Böszörményi
--
Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/
Attachment | Content-Type | Size |
---|---|---|
5-pg85-prepared-name-owned-1-ctxdiff.patch | text/x-patch | 1.1 KB |
From: | Michael Meskes <meskes(at)postgresql(dot)org> |
---|---|
To: | Boszormenyi Zoltan <zb(at)cybertec(dot)at> |
Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Michael Meskes <meskes(at)postgresql(dot)org>, Hans-Juergen Schoenig <hs(at)cybertec(dot)at> |
Subject: | Re: ECPG: store own copy of the prepared statement name |
Date: | 2009-10-15 10:21:24 |
Message-ID: | 20091015102124.GA31217@feivel.credativ.lan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, Oct 14, 2009 at 06:37:43PM +0200, Boszormenyi Zoltan wrote:
> the attached patch makes ECPG more robust
> against applications that free() strings by storing
> its own copy of the prepared statement name.
Please do not call strdup() directly in libecpg. Instead please use
ecpg_strdup() which does all the error handling needed. I changed this and
committed the patch. Thanks.
Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ: 179140304, AIM/Yahoo/Skype: michaelmeskes, Jabber: meskes(at)jabber(dot)org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!
From: | Boszormenyi Zoltan <zb(at)cybertec(dot)at> |
---|---|
To: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Michael Meskes <meskes(at)postgresql(dot)org> |
Cc: | Hans-Juergen Schoenig <hs(at)cybertec(dot)at> |
Subject: | Re: ECPG: store own copy of the prepared statement name |
Date: | 2009-10-15 11:49:09 |
Message-ID: | 4AD70C35.7010009@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Michael Meskes írta:
> On Wed, Oct 14, 2009 at 06:37:43PM +0200, Boszormenyi Zoltan wrote:
>
>> the attached patch makes ECPG more robust
>> against applications that free() strings by storing
>> its own copy of the prepared statement name.
>>
>
> Please do not call strdup() directly in libecpg. Instead please use
> ecpg_strdup() which does all the error handling needed. I changed this and
> committed the patch. Thanks.
>
> Michael
>
Thanks, I will keep it in mind.
Best regards,
Zoltán Böszörményi
--
Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/