From: Bruce Momjian Date: Thu, 20 Mar 2003 03:58:13 +0000 (+0000) Subject: The attatched patch fixes a memory error with contrib/dbmirror/pending.c X-Git-Tag: REL7_4_BETA1~904 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=900fa3d0f501d468d957ca8a1578ace7277a7b9c;p=postgresql 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 --- diff --git a/contrib/dbmirror/pending.c b/contrib/dbmirror/pending.c index 85a8385d3d..08ee3f6f83 100644 --- a/contrib/dbmirror/pending.c +++ b/contrib/dbmirror/pending.c @@ -1,6 +1,6 @@ /**************************************************************************** * pending.c - * $Id: pending.c,v 1.10 2002/11/26 03:08:00 momjian Exp $ + * $Id: pending.c,v 1.11 2003/03/20 03:58:13 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;