From dd912c697718e924387dd405413f94e481f8d0d4 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 27 Aug 2002 03:56:35 +0000 Subject: This patches replaces a few more usages of strcpy() and sprintf() when copying into a fixed-size buffer (in this case, a buffer of NAMEDATALEN bytes). AFAICT nothing to worry about here, but worth fixing anyway... Neil Conway --- src/backend/commands/tablecmds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/commands/tablecmds.c') diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 94c687721b0..c4e4affa119 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.33 2002/08/24 15:00:46 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.34 2002/08/27 03:56:34 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -3370,8 +3370,8 @@ AlterTableCreateToastTable(Oid relOid, bool silent) /* * Create the toast table and its index */ - sprintf(toast_relname, "pg_toast_%u", relOid); - sprintf(toast_idxname, "pg_toast_%u_index", relOid); + snprintf(toast_relname, NAMEDATALEN, "pg_toast_%u", relOid); + snprintf(toast_idxname, NAMEDATALEN, "pg_toast_%u_index", relOid); /* this is pretty painful... need a tuple descriptor */ tupdesc = CreateTemplateTupleDesc(3, WITHOUTOID); -- cgit v1.2.3