Re: write past chunk end in ExprContext / to_char

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: imad <immaad(at)gmail(dot)com>
Cc: "Patrick Welche" <prlw1(at)newn(dot)cam(dot)ac(dot)uk>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: write past chunk end in ExprContext / to_char
Date: 2007-06-29 00:25:46
Message-ID: 26014.1183076746@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

imad <immaad(at)gmail(dot)com> writes:
> This is the problematic part in formatting.c, function "dch_time".
> int siz = strlen(tmtcTzn(tmtc));
>
> if (arg == DCH_TZ)
> strcpy(inout, tmtcTzn(tmtc));
> else
> {
> char *p = palloc(siz);
>
> strcpy(p, tmtcTzn(tmtc));
> strcpy(inout, str_tolower(p));
> pfree(p);
> }
> return siz;

Hmm. That was not the buffer overrun I was looking at, but it sure
looks like another one :-(. Thanks for spotting it!

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message ITAGAKI Takahiro 2007-06-29 00:29:09 Re: lazy vacuum sleeps with exclusive lock on table
Previous Message Tom Lane 2007-06-29 00:23:37 Re: SetBufferCommitInfoNeedsSave and race conditions