aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-11-22 16:25:32 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-11-22 16:25:32 +0000
commit95c9c22633f291e0f78a35614847fc80c87d0880 (patch)
tree80bcd2e3b8903be73e25f63e597a390492732488 /src
parenteeec0a6775df7c1250c58b34af9d1eed88c60823 (diff)
downloadpostgresql-95c9c22633f291e0f78a35614847fc80c87d0880.tar.gz
postgresql-95c9c22633f291e0f78a35614847fc80c87d0880.zip
Fix a dozen or so places that were passing unpredictable data strings
as elog format strings. Hai-Chen Tu pointed out the problem in contrib/dbmirror, but it wasn't the only such error.
Diffstat (limited to 'src')
-rw-r--r--src/pl/plpython/plpython.c4
-rw-r--r--src/pl/tcl/pltcl.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c
index 43c34271961..099388674a6 100644
--- a/src/pl/plpython/plpython.c
+++ b/src/pl/plpython/plpython.c
@@ -29,7 +29,7 @@
* MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.26 2002/10/19 22:10:58 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.27 2002/11/22 16:25:30 tgl Exp $
*
*********************************************************************
*/
@@ -2733,7 +2733,7 @@ PLy_output(volatile int level, PyObject * self, PyObject * args)
RERAISE_EXC();
}
- elog(level, sv);
+ elog(level, "%s", sv);
RESTORE_EXC();
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c
index 0210dfd8174..bebb82ebdf0 100644
--- a/src/pl/tcl/pltcl.c
+++ b/src/pl/tcl/pltcl.c
@@ -31,7 +31,7 @@
* ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.66 2002/10/19 22:10:58 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.67 2002/11/22 16:25:32 tgl Exp $
*
**********************************************************************/
@@ -1303,7 +1303,7 @@ pltcl_elog(ClientData cdata, Tcl_Interp *interp,
* and return to the caller (if not catched)
************************************************************/
UTF_BEGIN;
- elog(level, UTF_U2E(argv[2]));
+ elog(level, "%s", UTF_U2E(argv[2]));
UTF_END;
memcpy(&Warn_restart, &save_restart, sizeof(Warn_restart));
return TCL_OK;