| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Tomas Szepe <szepe(at)pinerecords(dot)com> |
| Cc: | pgsql-bugs(at)postgresql(dot)org, gnotari(at)linkgroup(dot)it |
| Subject: | Re: segfault at aset.c:539 |
| Date: | 2003-07-14 16:49:25 |
| Message-ID: | 2258.1058201365@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Tomas Szepe <szepe(at)pinerecords(dot)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 */
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tomas Szepe | 2003-07-14 17:19:49 | Re: segfault at aset.c:539 |
| Previous Message | Tomas Szepe | 2003-07-14 15:37:51 | Re: segfault at aset.c:539 |