From b7a1d9e0d9141c6acae8a14d489a14e84c0874b0 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 13 Mar 2021 00:14:06 +0000 Subject: xdvi: escape also & before passing to shell git-svn-id: svn://tug.org/texlive/trunk@58317 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/xdvik/string-utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Build') 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? */ -- cgit v1.2.3