Skip to content

Commit 15b5d6c

Browse files
committed
I noticed in the 7.4 release that in contrib/pg_autovacuum, args->logfile is
not initialized if a log file is not specified on the command line. This causes an immediate segfault on systems that fill allocated memory with some value other than zero (my FreeBSD machine uses 0xD0). Several crashes later I discovered that args->user, password, host, and port are also used without being initialized. This doesn't appear to be fixed in CVS and I came up empty on a mailing list search -- hope it hasn't been reported already. Craig Boston
1 parent 5ef01a2 commit 15b5d6c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

contrib/pg_autovacuum/pg_autovacuum.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,11 @@ get_cmd_args(int argc, char *argv[])
811811
args->analyze_scaling_factor = -1;
812812
args->debug = AUTOVACUUM_DEBUG;
813813
args->daemonize = 0;
814+
args->user = 0;
815+
args->password = 0;
816+
args->host = 0;
817+
args->logfile = 0;
818+
args->port = 0;
814819

815820
/*
816821
* Fixme: Should add some sanity checking such as positive integer

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