mirror of
https://github.com/postgres/postgres.git
synced 2025-06-18 00:02:37 -04:00
Fix buffer overrun in pg_upgrade.
Problem reported, and cause identified, by Hernan Gonzalez.
This commit is contained in:
parent
e84bf65121
commit
368e44f6a5
@ -545,7 +545,7 @@ putenv2(migratorContext *ctx, const char *var, const char *val)
|
||||
{
|
||||
#ifndef WIN32
|
||||
char *envstr = (char *) pg_malloc(ctx, strlen(var) +
|
||||
strlen(val) + 1);
|
||||
strlen(val) + 2);
|
||||
|
||||
sprintf(envstr, "%s=%s", var, val);
|
||||
putenv(envstr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user