Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 71baff1

Browse files
committed
Fix buffer overrun in pg_upgrade.
Problem reported, and cause identified, by Hernan Gonzalez.
1 parent 9f376e1 commit 71baff1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/pg_upgrade/controldata.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ putenv2(const char *var, const char *val)
545545
{
546546
#ifndef WIN32
547547
char *envstr = (char *) pg_malloc(strlen(var) +
548-
strlen(val) + 1);
548+
strlen(val) + 2);
549549

550550
sprintf(envstr, "%s=%s", var, val);
551551
putenv(envstr);

0 commit comments

Comments
 (0)