Re: BUG #7811: strlen(NULL) cause psql crash

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #7811: strlen(NULL) cause psql crash
Дата
Msg-id 29141.1358273456@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #7811: strlen(NULL) cause psql crash  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Ответы Re: BUG #7811: strlen(NULL) cause psql crash  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-bugs
Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> That'd change the behavior of all sprintf calls, not sure we want to go
> there.

I don't think so; especially since the proposed fix doesn't help on
systems where we are using the native printf.

> I committed a local fix to help.c to print "none" as the database name
> when not connected.

I think that patch could use more thought.  As is, it will print

    connect to new database (currently "none")

which to me is claiming that we are connected to a database whose name
is "none".  The quotes should not be used in this situation, and in
fact it would be better for translatability if the whole message text
were specialized to this case.  I'd like to see it reading more like

    connect to new database (currently no connection)

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: BUG #7811: strlen(NULL) cause psql crash
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: BUG #7811: strlen(NULL) cause psql crash