fix ecpg core dump when there's a very long struct variable name in .pgc file - Mailing list pgsql-hackers

From Chen Huajun
Subject fix ecpg core dump when there's a very long struct variable name in .pgc file
Date
Msg-id 50ADF9D0.6020405@cn.fujitsu.com
Whole thread Raw
Responses Re: fix ecpg core dump when there's a very long struct variable name in .pgc file  (Chen Huajun <chenhj@cn.fujitsu.com>)
Re: fix ecpg core dump when there's a very long struct variable name in .pgc file  (Michael Meskes <meskes@postgresql.org>)
List pgsql-hackers
hi

I found a small bug in ecpg command and try to fix it.
Please check if it is correct.

When use a struct variable whose name length is very very long such as 12KB in .pgc source,
ecpg will core dump because of buffer overflow if precompile the .pgc file.

$ ecpg testLongStructName.pgc
Segmentation fault (core dumped)


Normally no body will write a variable with so long name,
but whether it's better to fix it.


Best Regards,
Chen Huajun

Attachment

pgsql-hackers by date:

Previous
From: Boszormenyi Zoltan
Date:
Subject: Re: [PATCH] Make pg_basebackup configure and start standby [Review]
Next
From: Sebastien FLAESCH
Date:
Subject: Re: Database object names and libpq in UTF-8 locale on Windows