Skip site navigation (1) Skip section navigation (2)

Re: use-after-free in psql

From: Greg Sabino Mullane <greg(at)turnstep(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Cc: neilc(at)samurai(dot)com
Subject: Re: use-after-free in psql
Date: 2006-06-30 14:41:51
Message-ID: 1151678511.27767.5.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-bugs
> There's a minor bug in the ON_ERROR_ROLLBACK code in psql. In 
> HEAD, at line 878 the storage pointed to by "results" is 
> released by a PQclear(), but is referenced by the 
> PQcmdStatus() calls on lines 898, 899, and 900.
>
> I'm busy at the moment -- if someone wants to fix this 
> (backport to 8.1 please!), have at it.

Attached is a quick patch for HEAD and 8.1, which should do the job.
Thanks for finding this.

--
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200606301039
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

pgsql-bugs by date

Next:From: N. RamirezDate: 2006-06-30 19:33:35
Subject: BUG #2507: Problem using two-phase commit
Previous:From: Alvaro HerreraDate: 2006-06-30 14:41:32
Subject: Re: use-after-free in psql

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group