From: Michael R Sweet Date: Sat, 27 Jun 2026 14:25:05 +0000 (-0400) Subject: Fix escaping of spaces in options (Issue #1630) X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d72dffab0686dcf3b1b0728702ade46530e2c4b;p=thirdparty%2Fcups.git Fix escaping of spaces in options (Issue #1630) --- diff --git a/scheduler/job.c b/scheduler/job.c index 2e61d14642..d8e3c602ba 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -4171,10 +4171,19 @@ get_options(cupsd_job_t *job, /* I - Job */ if (isspace(*valptr & 255)) { + /* + * Escape whitespace... + */ + + *optptr++ = '\\'; *optptr++ = ' '; } else if ((*valptr & 255) >= ' ' && *valptr != 0x7f) { + /* + * Escape other special characters as needed... + */ + if (strchr("\\\'\"", *valptr)) *optptr++ = '\\'; *optptr++ = *valptr;