From: mike Date: Tue, 11 Dec 2012 19:24:22 +0000 (+0000) Subject: Strip trailing slash from regex paths to prevent sandboxing issues. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1b04692c7f57b75b3a9967d3186b13a4d67bf74;p=thirdparty%2Fcups.git Strip trailing slash from regex paths to prevent sandboxing issues. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10747 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/scheduler/process.c b/scheduler/process.c index 055e114614..4a09858211 100644 --- a/scheduler/process.c +++ b/scheduler/process.c @@ -638,6 +638,9 @@ cupsd_requote(char *dst, /* I - Destination buffer */ { ch = *src++; + if (ch == '/' && !*src) + break; /* Don't add trailing slash */ + if (strchr(".?*()[]^$\\", ch)) *dstptr++ = '\\';