git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4aaa3b5)
Fix off-by-one check that can lead to a memory overflow in ecpg.
2019年4月11日 18:56:17 +0000 (20:56 +0200)
2019年4月11日 18:56:17 +0000 (20:56 +0200)
Patch by Liu Huailing <liuhuailing@cn.fujitsu.com>


diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l
index 60474b0b4a6d5848c2b6a76d6142edefff811380..3dc2453a2fc83fd358d2d3c8b4ad601ff354b65d 100644 (file)
--- a/src/interfaces/ecpg/preproc/pgc.l
+++ b/src/interfaces/ecpg/preproc/pgc.l
@@ -1556,7 +1556,7 @@ parse_include(void)
for (ip = include_paths; yyin == NULL && ip != NULL; ip = ip->next)
{
- if (strlen(ip->path) + strlen(yytext) + 3 > MAXPGPATH)
+ if (strlen(ip->path) + strlen(yytext) + 4 > MAXPGPATH)
{
fprintf(stderr, _("Error: include path \"%s/%s\" is too long on line %d, skipping\n"), ip->path, yytext, yylineno);
continue;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /