mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
I checked all the previous string handling errors and most of them were
already fixed by You. However there were a few left and attached patch should fix the rest of them. I used StringInfo only in 2 places and both of them are inside debug ifdefs. Only performance penalty will come from using strlen() like all the other code does. I also modified some of the already patched parts by changing snprintf(buf, 2 * BUFSIZE, ... style lines to snprintf(buf, sizeof(buf), ... where buf is an array. Jukka Holappa
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.295 2002/08/29 00:17:05 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.296 2002/09/02 06:11:42 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -5706,7 +5706,7 @@ setMaxOid(Archive *fout)
|
||||
PQclear(res);
|
||||
if (g_verbose)
|
||||
write_msg(NULL, "maximum system oid is %u\n", max_oid);
|
||||
snprintf(sql, 1024,
|
||||
snprintf(sql, sizeof(sql),
|
||||
"CREATE TEMPORARY TABLE pgdump_oid (dummy integer);\n"
|
||||
"COPY pgdump_oid WITH OIDS FROM stdin;\n"
|
||||
"%u\t0\n"
|
||||
|
Reference in New Issue
Block a user