From 71f5b048d3c52c4f4943e0964db15e65e4eeb375 Mon Sep 17 00:00:00 2001 From: Rusty Bird Date: Sat, 2 Dec 2023 18:16:37 +0000 Subject: [PATCH] qrexec-lib/pack: don't use curly quotes in error messages For PROGRESS_TYPE=gui the error handler calls zenity, which fails to launch if the error message contains characters not supported by the locale's charset (e.g. LC_CTYPE=C). Filenames in the error message were already sanitized to printable ASCII, but then enclosed in UTF-8 curly quotation marks. Fixes QubesOS/qubes-issues#8738 --- qrexec-lib/pack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qrexec-lib/pack.c b/qrexec-lib/pack.c index 7aefb556..579b3b64 100644 --- a/qrexec-lib/pack.c +++ b/qrexec-lib/pack.c @@ -100,10 +100,10 @@ void wait_for_result(void) if (hdr.error_code != 0) { switch (hdr.error_code) { case EEXIST: - call_error_handler("A file named “%s” already exists in QubesIncoming dir", last_filename); + call_error_handler("A file named \"%s\" already exists in QubesIncoming dir", last_filename); break; case EINVAL: - call_error_handler("File copy: Corrupted data from packer%s“%s”", last_filename_prefix, last_filename); + call_error_handler("File copy: Corrupted data from packer%s\"%s\"", last_filename_prefix, last_filename); break; case EDQUOT: if (ignore_quota_error) { @@ -113,7 +113,7 @@ void wait_for_result(void) } /* fallthrough */ default: - call_error_handler("File copy: “%s%s%s”", + call_error_handler("File copy: \"%s%s%s\"", strerror(hdr.error_code), last_filename_prefix, last_filename); } }