mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-30 19:00:29 +08:00
Fix buffer overrun in pg_upgrade.
Problem reported, and cause identified, by Hernan Gonzalez.
This commit is contained in:
parent
9f376e146b
commit
71baff1786
@ -545,7 +545,7 @@ putenv2(const char *var, const char *val)
|
||||
{
|
||||
#ifndef WIN32
|
||||
char *envstr = (char *) pg_malloc(strlen(var) +
|
||||
strlen(val) + 1);
|
||||
strlen(val) + 2);
|
||||
|
||||
sprintf(envstr, "%s=%s", var, val);
|
||||
putenv(envstr);
|
||||
|
Loading…
Reference in New Issue
Block a user