diff options
author | Bruce Momjian | 2002-09-02 06:11:43 +0000 |
---|---|---|
committer | Bruce Momjian | 2002-09-02 06:11:43 +0000 |
commit | a12b4e279bc12a7cd7b7d679fcac4689ac4aba7b (patch) | |
tree | ff120ff0c156829d771bdc874fe8fbb2aa4fbf6e /src/interfaces/libpgtcl | |
parent | 48e1a39924d9e0674306156a6519cf5688c67c43 (diff) |
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
Diffstat (limited to 'src/interfaces/libpgtcl')
-rw-r--r-- | src/interfaces/libpgtcl/pgtclCmds.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/interfaces/libpgtcl/pgtclCmds.c b/src/interfaces/libpgtcl/pgtclCmds.c index 0cb46686dc1..901bcbfd329 100644 --- a/src/interfaces/libpgtcl/pgtclCmds.c +++ b/src/interfaces/libpgtcl/pgtclCmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.64 2002/08/18 01:39:43 momjian Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.65 2002/09/02 06:11:43 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1579,7 +1579,8 @@ Pg_lo_import(ClientData cData, Tcl_Interp *interp, int argc, char *argv[]) lobjId = lo_import(conn, filename); if (lobjId == InvalidOid) { - sprintf(interp->result, "Pg_lo_import of '%s' failed", filename); + /* What is the maximum size of this? FIXME if this is not a good quess */ + snprintf(interp->result, 128, "Pg_lo_import of '%s' failed", filename); return TCL_ERROR; } sprintf(interp->result, "%u", lobjId); |