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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy