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

From Chen Huajun
Subject Re: fix ecpg core dump when there's a very long struct variable name in .pgc file
Date
Msg-id 50AE0376.6020009@cn.fujitsu.com
Whole thread Raw
In response to fix ecpg core dump when there's a very long struct variable name in .pgc file  (Chen Huajun <chenhj@cn.fujitsu.com>)
List pgsql-hackers
sorry,There's a miss(with out free memory) in that patch sended just now,
and resend it.

Best Regards,
Chen Huajun

(2012/11/22 18:09), Chen Huajun wrote:
> 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
>
>
>
>

--
Best Regards
--------------------------------------------------
  富士通南大軟件技術有限公司(FNST)
  第二ソフトウェア事業部第三開発部
  陳華軍(チン カグン)
  Addr: 南京富士通南大軟件技術有限公司(FNST)
        中国南京市雨花台区文竹路6号(210012)
  Mail: chenhj@cn.fujitsu.com
  Tel : +86+25-86630566-8406  内線: 7998-8406
  Fax : +86+25-83317685
--------------------------------------------------

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: review: Deparsing DDL command strings
Next
From: Dimitri Fontaine
Date:
Subject: Re: WIP json generation enhancements