mirror of https://github.com/postgres/postgres
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