| From: | Bruce Momjian <bruce(at)momjian(dot)us> | 
|---|---|
| To: | Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> | 
| Cc: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> | 
| Subject: | Re: Remove FATAL from pg_lzdecompress | 
| Date: | 2008-03-03 17:12:56 | 
| Message-ID: | 200803031712.m23HCui20385@momjian.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-patches | 
Your patch has been added to the PostgreSQL unapplied patches list at:
http://momjian.postgresql.org/cgi-bin/pgpatches
It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.
---------------------------------------------------------------------------
Zdenek Kotala wrote:
> 
> I attach patch which adds boundaries check and memory overwriting 
> protection when compressed data are corrupted.
> 
> Current behavior let code overwrite a memory and after that check if 
> unpacked size is same as expected value. In this case elog execution 
> fails (at least on Solaris - malloc has corrupted structures) and no 
> message appears in a log file.
> 
> I did not add any extra information into the message. Reasonable 
> solution seems to be use errcontext how was recommended by Alvaro. But I 
> 'm not sure if printtup is good place for it, because pg_detoast is 
> called from many places. However, is can be solved in separate patch.
> 
> I'm also think that this modification should be backported to other 
> version too.
> 
> 		Thanks Zdenek
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2008-03-03 17:13:19 | Re: sinval.c / sinvaladt.c restructuring | 
| Previous Message | Bruce Momjian | 2008-03-03 17:12:44 | Re: CopyReadAttributesCSV optimization |