mirror of
https://github.com/postgres/postgres.git
synced 2026-02-11 14:53:31 -05:00
Fix potential memory access violation in ecpg if filename of include file is
shorter than 2 characters. Patch by: "Wu, Fei" <wufei.fnst@cn.fujitsu.com>
This commit is contained in:
parent
98bdaab0d9
commit
08cecfaf60
1 changed files with 1 additions and 1 deletions
|
|
@ -1538,7 +1538,7 @@ parse_include(void)
|
|||
yyin = fopen(inc_file, "r");
|
||||
if (!yyin)
|
||||
{
|
||||
if (strcmp(inc_file + strlen(inc_file) - 2, ".h") != 0)
|
||||
if (strlen(inc_file) <= 2 || strcmp(inc_file + strlen(inc_file) - 2, ".h") != 0)
|
||||
{
|
||||
strcat(inc_file, ".h");
|
||||
yyin = fopen(inc_file, "r");
|
||||
|
|
|
|||
Loading…
Reference in a new issue