summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2021-03-13 00:14:06 +0000
committerNorbert Preining <preining@logic.at>2021-03-13 00:14:06 +0000
commitb7a1d9e0d9141c6acae8a14d489a14e84c0874b0 (patch)
tree11aeb3855cdc859b6b326e92cc2b071a45bf77ea /Build
parent31db60b2240582993afb67e38e351ead79f680c7 (diff)
xdvi: escape also & before passing to shell
git-svn-id: svn://tug.org/texlive/trunk@58317 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/xdvik/string-utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Build/source/texk/xdvik/string-utils.c b/Build/source/texk/xdvik/string-utils.c
index 769b2ac8ccc..a09a1b77762 100644
--- a/Build/source/texk/xdvik/string-utils.c
+++ b/Build/source/texk/xdvik/string-utils.c
@@ -636,7 +636,7 @@ canonicalize_path(const char *path)
}
/* Escape all of the following characters in str:
- ` \ ; ( )
+ ` \ ; ( ) &
making it safe to pass str to a shell. Return result in a newly
allocated string, which the caller is responsible to free() after use.
*/
@@ -653,6 +653,7 @@ shell_escape_string(const char *str)
|| *src_ptr == '`'
|| *src_ptr == '('
|| *src_ptr == ')'
+ || *src_ptr == '&'
|| *src_ptr == ';') {
#if 0
/* only if not yet escaped? */