summaryrefslogtreecommitdiff
path: root/src/bin/psql/command.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-01-24 05:23:55 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-01-24 05:23:55 +0000
commita307ee1ccb0d832d0f6810ea0436536bcecb2297 (patch)
tree844453295e438b4cf4ec9f419a47196082607ceb /src/bin/psql/command.c
parenta825ad2bda778524dde58143a98237b242268b2e (diff)
Back-patch fix for not shell-quoting editor name, as it also fixes
silly buffer overrun (someone needs to learn to count characters...)
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r--src/bin/psql/command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 83ce799e51c..d3cb4181ecd 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -3,7 +3,7 @@
*
* Copyright 2000-2002 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.84 2002/10/23 19:23:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.84.2.1 2003/01/24 05:23:55 tgl Exp $
*/
#include "postgres_fe.h"
#include "command.h"
@@ -1518,7 +1518,7 @@ editFile(const char *fname)
sys = malloc(strlen(editorName) + strlen(fname) + 10 + 1);
if (!sys)
return false;
- sprintf(sys, "exec '%s' '%s'", editorName, fname);
+ sprintf(sys, "exec %s '%s'", editorName, fname);
result = system(sys);
if (result == -1)
psql_error("could not start editor %s\n", editorName);