diff options
author | Bruce Momjian <bruce@momjian.us> | 2003-03-20 03:58:48 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2003-03-20 03:58:48 +0000 |
commit | e8b9aeea416aafdc7472c7c29743b8ede20e7e70 (patch) | |
tree | 7ae7158ae74f239120230ffd8da4c317809bf162 | |
parent | e02ace4418026de395ae8458d39ce21b251a518b (diff) | |
download | postgresql-e8b9aeea416aafdc7472c7c29743b8ede20e7e70.tar.gz postgresql-e8b9aeea416aafdc7472c7c29743b8ede20e7e70.zip |
The attatched patch fixes a memory error with contrib/dbmirror/pending.c
when running it with older(Pre 7.3.x) versions of Postgresql.
Backpatched to 7.3.X.
Steven Singer
-rw-r--r-- | contrib/dbmirror/pending.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/dbmirror/pending.c b/contrib/dbmirror/pending.c index 41b534493fa..04f1371bd78 100644 --- a/contrib/dbmirror/pending.c +++ b/contrib/dbmirror/pending.c @@ -1,6 +1,6 @@ /**************************************************************************** * pending.c - * $Id: pending.c,v 1.6.2.4 2002/11/26 03:08:23 momjian Exp $ + * $Id: pending.c,v 1.6.2.5 2003/03/20 03:58:48 momjian Exp $ * * This file contains a trigger for Postgresql-7.x to record changes to tables * to a pending table for mirroring. @@ -99,7 +99,7 @@ recordchange(PG_FUNCTION_ARGS) sprintf(fullyqualtblname,"\"%s\".\"%s\"", schemaname,tblname); #else - fullyqualtblname = SPI_palloc(strlen(tblname + 3)); + fullyqualtblname = SPI_palloc(strlen(tblname) + 3); sprintf(fullyqualtblname,"\"%s\"",tblname); #endif tupdesc = trigdata->tg_relation->rd_att; |