Skip to content

Commit ed16ba3

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 4aaa3b5 commit ed16ba3

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
@@ -1556,7 +1556,7 @@ parse_include(void)
15561556

15571557
for (ip = include_paths; yyin == NULL && ip != NULL; ip = ip->next)
15581558
{
1559-
if (strlen(ip->path) + strlen(yytext) + 3 > MAXPGPATH)
1559+
if (strlen(ip->path) + strlen(yytext) + 4 > MAXPGPATH)
15601560
{
15611561
fprintf(stderr, _("Error: include path \"%s/%s\" is too long on line %d, skipping\n"), ip->path, yytext, yylineno);
15621562
continue;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy