Commit 71baff17 authored by Tom Lane's avatar Tom Lane

Fix buffer overrun in pg_upgrade.

Problem reported, and cause identified, by Hernan Gonzalez.
parent 9f376e14
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment