Content-Length: 258443 | pFad | http://github.com/postgrespro/postgres_cluster/commit/08cecfaf60c484f219ba7e6ee23e9699aea4e9af

93 Fix potential memory access violation in ecpg if filename of include … · postgrespro/postgres_cluster@08cecfa · GitHub
Skip to content

Commit 08cecfa

Browse files
author
Michael Meskes
committed
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>
1 parent 98bdaab commit 08cecfa

File tree

1 file changed

+1
-1
lines changed
  • src/interfaces/ecpg/preproc

1 file changed

+1
-1
lines changed

src/interfaces/ecpg/preproc/pgc.l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ parse_include(void)
15381538
yyin = fopen(inc_file, "r");
15391539
if (!yyin)
15401540
{
1541-
if (strcmp(inc_file + strlen(inc_file) - 2, ".h") != 0)
1541+
if (strlen(inc_file) <= 2 || strcmp(inc_file + strlen(inc_file) - 2, ".h") != 0)
15421542
{
15431543
strcat(inc_file, ".h");
15441544
yyin = fopen(inc_file, "r");

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/08cecfaf60c484f219ba7e6ee23e9699aea4e9af

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy