This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository terminology.
View the commit online.
commit bdb6752daaa4ab8a90dd0297877034af34a9ecef
Author: Boris Faure <[email protected]>
AuthorDate: Wed Sep 16 14:12:40 2026 +0000
keyin: quote the command built for a new terminal window
---
src/bin/keyin.c | 38 ++++++++++++++++++++++----------------
1 file changed, 22 insertions(+), 16 deletions(-)
diff --git a/src/bin/keyin.c b/src/bin/keyin.c
index b125ba1c..5cad201f 100644
--- a/src/bin/keyin.c
+++ b/src/bin/keyin.c
@@ -8,6 +8,7 @@
#include "termio.h"
#include "termcmd.h"
#include "keyin.h"
+#include "utils.h"
#include "win.h"
typedef struct tag_Tty_Key Tty_Key;
@@ -495,6 +496,7 @@ static Eina_Bool
cb_term_new(Evas_Object *termio_obj)
{
char path[PATH_MAX], cwd[PATH_MAX];
+ char *quoted_path, *quoted_cwd = NULL, *cmd = NULL;
RETURN_FALSE_ON_GROUP_ACTION_ALREADY_HANDLED;
@@ -505,26 +507,30 @@ cb_term_new(Evas_Object *termio_obj)
snprintf(path, sizeof(path), "%s/%s", elm_app_bin_dir_get(),
"terminology");
#endif
- if (termio_cwd_get(termio_obj, cwd, sizeof(cwd)))
- {
- const char *template = "%s -d %s";
- int length;
- char *cmd;
- length = (strlen(path) + strlen(cwd) + strlen(template) - 3);
- cmd = malloc(sizeof(char) * length);
- if (cmd)
- {
- snprintf(cmd, length, template, path, cwd);
- ecore_exe_run(cmd, NULL);
- free(cmd);
- }
- }
- else
+ /* ecore_exe_run() hands the string to a shell on any metacharacter. */
+ quoted_path = shell_quote(path);
+ if (!quoted_path)
+ return EINA_TRUE;
+ if (termio_cwd_get(termio_obj, cwd, sizeof(cwd)))
+ quoted_cwd = shell_quote(cwd);
+
+ if (quoted_cwd)
{
- ecore_exe_run(path, NULL);
+ size_t len = strlen(quoted_path) + sizeof(" -d ") - 1 +
+ strlen(quoted_cwd) + 1;
+
+ cmd = malloc(len);
+ if (cmd)
+ snprintf(cmd, len, "%s -d %s", quoted_path, quoted_cwd);
}
+ ecore_exe_run(cmd ? cmd : quoted_path, NULL);
+
+ free(cmd);
+ free(quoted_cwd);
+ free(quoted_path);
+
return EINA_TRUE;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.