From: Tom Lane Date: Fri, 24 Jan 2003 05:23:55 +0000 (+0000) Subject: Back-patch fix for not shell-quoting editor name, as it also fixes X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=1ab64a5fc1ed129a9039037da1a4ec372e1ec136;p=users%2Fbernd%2Fpostgres.git Back-patch fix for not shell-quoting editor name, as it also fixes silly buffer overrun (someone needs to learn to count characters...) --- diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 8cf8a7dbe5..e3a1043b04 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -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);