Fix breakage introduced by evidently-completely-untested snprintf patch.
authorTom Lane
Mon, 2 Sep 2002 14:43:14 +0000 (14:43 +0000)
committerTom Lane
Mon, 2 Sep 2002 14:43:14 +0000 (14:43 +0000)
src/interfaces/ecpg/preproc/preproc.y

index 7069d5611d77a1f793eb58c444afa4eb29dc46df..771f80354acfe2c11d542e8fbc12211fa7e9ba6f 100644 (file)
@@ -1,4 +1,4 @@
-/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.196 2002/09/02 06:11:43 momjian Exp $ */
+/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.197 2002/09/02 14:43:14 tgl Exp $ */
 
 /* Copyright comment */
 %{
@@ -3628,7 +3628,8 @@ connection_target: database_name opt_server opt_port
            /* old style: dbname[@server][:port] */
            if (strlen($2) > 0 && *($2) != '@')
            {
-               sprintf(errortext, sizeof(errortext), "Expected '@', found '%s'", $2);
+               snprintf(errortext, sizeof(errortext),
+                        "Expected '@', found '%s'", $2);
                mmerror(PARSE_ERROR, ET_ERROR, errortext);
            }