Content-Length: 258667 | pFad | http://github.com/postgrespro/postgres/commit/0ba09cc026985536586b7fd58ceddee16ea739d7

37 Fix off-by-one check that can lead to a memory overflow in ecpg. · postgrespro/postgres@0ba09cc · GitHub
Skip to content

Commit 0ba09cc

Browse files
author
Michael Meskes
committed
Fix off-by-one check that can lead to a memory overflow in ecpg.
Patch by Liu Huailing <liuhuailing@cn.fujitsu.com>
1 parent 5db8568 commit 0ba09cc

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
@@ -1414,7 +1414,7 @@ parse_include(void)
14141414

14151415
for (ip = include_paths; yyin == NULL && ip != NULL; ip = ip->next)
14161416
{
1417-
if (strlen(ip->path) + strlen(yytext) + 3 > MAXPGPATH)
1417+
if (strlen(ip->path) + strlen(yytext) + 4 > MAXPGPATH)
14181418
{
14191419
fprintf(stderr, _("Error: include path \"%s/%s\" is too long on line %d, skipping\n"), ip->path, yytext, yylineno);
14201420
continue;

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/commit/0ba09cc026985536586b7fd58ceddee16ea739d7

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy