mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +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:
@ -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);
|
||||
|
Reference in New Issue
Block a user