Re: segfault at aset.c:539

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: segfault at aset.c:539
Дата
Msg-id 2258.1058201365@sss.pgh.pa.us
обсуждение исходный текст
Ответ на segfault at aset.c:539  (Tomas Szepe <szepe@pinerecords.com>)
Ответы Re: segfault at aset.c:539  (Tomas Szepe <szepe@pinerecords.com>)
Список pgsql-bugs
Tomas Szepe <szepe@pinerecords.com> writes:
> I'm getting an ugly non-deterministic segfault in postmaster
> at aset.c:539.
> ...
> Anyone with a fix? :)

Yech.  This is the *second* buffer-overrun bug we've found in to_ascii()
in the last couple months.  I've now taken a close look at that whole
file and I think the rest of it is okay, but ... :-(

Patch against 7.3.3 is attached.

            regards, tom lane

*** src/backend/utils/adt/ascii.c.orig    Wed Apr  2 16:08:07 2003
--- src/backend/utils/adt/ascii.c    Mon Jul 14 12:37:33 2003
***************
*** 94,100 ****
  {
      pg_to_ascii(
                  (unsigned char *) VARDATA(data),        /* src */
!                 VARDATA(data) + VARSIZE(data),    /* src end */
                  (unsigned char *) VARDATA(data),        /* desc */
                  enc);            /* encoding */

--- 94,100 ----
  {
      pg_to_ascii(
                  (unsigned char *) VARDATA(data),        /* src */
!                 (unsigned char *) (data) + VARSIZE(data),    /* src end */
                  (unsigned char *) VARDATA(data),        /* desc */
                  enc);            /* encoding */

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

Предыдущее
От: Tomas Szepe
Дата:
Сообщение: Re: segfault at aset.c:539
Следующее
От: Tomas Szepe
Дата:
Сообщение: Re: segfault at aset.c:539