PATCH: Uninitialized variable usage in contrib/pg_autovacuum

From: Craig Boston <craig(at)qbrtr(dot)gank(dot)org>
To: pgsql-patches(at)postgresql(dot)org
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: PATCH: Uninitialized variable usage in contrib/pg_autovacuum
Date: 2003-11-21 23:55:54
Message-ID: 200311211755.54858.craig@qbrtr.gank.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches

Sorry about the cross-post -- I'm not 100% sure which list this should be sent
to.

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.

Attached is a quick patch that fixes the problem.

--
Craig

Attachment Content-Type Size
autovacuum.uninit.patch text/plain 427 bytes

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Fetter 2003-11-22 07:41:43 Re: PERFORM bug with FOUND?
Previous Message Tom Lane 2003-11-21 22:56:20 Re: PERFORM bug with FOUND?

Browse pgsql-patches by date

  From Date Subject
Next Message Christopher Kings-Lynne 2003-11-22 02:57:33 Re: COMMENT ON mega patch
Previous Message Tom Lane 2003-11-21 22:45:23 Re: COMMENT ON mega patch