fix ecpg core dump when there's a very long struct variable name in .pgc file
Chen Huajun <chenhj@cn.fujitsu.com>
From: Chen Huajun <chenhj@cn.fujitsu.com>
To: pgsql-hackers@postgresql.org
Date: 2012-11-22T10:09:20Z
Lists: pgsql-hackers
Attachments
- ecpg_LongStrucNameDump_fix.diff (text/plain) patch
- testLongStructName12K.zip (application/x-zip-compressed)
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