Re: PATCH: Uninitialized variable usage in contrib/pg_autovacuum - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: PATCH: Uninitialized variable usage in contrib/pg_autovacuum
Date
Msg-id 200312012314.hB1NEBn12738@candle.pha.pa.us
Whole thread Raw
In response to PATCH: Uninitialized variable usage in contrib/pg_autovacuum  (Craig Boston <craig@qbrtr.gank.org>)
List pgsql-bugs
Patch applied to 7.4.X too.

---------------------------------------------------------------------------

Craig Boston wrote:
> 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, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PATCH: Uninitialized variable usage in contrib/pg_autovacuum
Next
From: Martin Edlman
Date:
Subject: Re: Repeatedly breaking indexes - SOLVED