Re: pg_dump: fix crash on error - Mailing list pgsql-patches

From Tom Lane
Subject Re: pg_dump: fix crash on error
Date
Msg-id 21781.1122439567@sss.pgh.pa.us
Whole thread Raw
In response to pg_dump: fix crash on error  (Neil Conway <neilc@samurai.com>)
Responses Re: pg_dump: fix crash on error  (Neil Conway <neilc@samurai.com>)
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> If pg_dump fails to connect to Postgres, it attempts to print an error
> message in ConnectDatabase():
> ...
> But if no database is explicitly specified, `dbname' is NULL, and libc
> is entitled to crash if you pass a NULL pointer to it for a %s
> formatting sequence (it actually does crash on Solaris, for example --
> per report from Omar Kilani).

[ scratches head... ]  Did this code change recently?  It's a tad hard
to believe that such a thing could have gone unnoticed for long.

            regards, tom lane

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: pg_dump: fix crash on error
Next
From: Neil Conway
Date:
Subject: Re: pg_dump: fix crash on error