Index: cups/test.ppd
===================================================================
--- cups/test.ppd	(revision 8897)
+++ cups/test.ppd	(working copy)
@@ -39,7 +39,7 @@
 *Throughput:	"1"
 *LandscapeOrientation: Plus90
 *TTRasterizer:	Type42
-*cupsFilter: "application/vnd.cups-raster - 0"
+*cupsFilter: "application/vnd.cups-raster 0 -"
 *RequiresPageRegion All: True
 
 *% These constraints are used to test ppdConflicts() and cupsResolveConflicts()
Index: cups/ppd.c
===================================================================
--- cups/ppd.c	(revision 8897)
+++ cups/ppd.c	(working copy)
@@ -352,11 +352,13 @@
 		  _("Illegal option keyword string"),
 		  _("Illegal translation string"),
 		  _("Illegal whitespace character"),
-		  _("Bad custom parameter")
+		  _("Bad custom parameter"),
+		  _("Missing option keyword"),
+		  _("Bad value string")
 		};
 
 
-  if (status < PPD_OK || status > PPD_ILLEGAL_WHITESPACE)
+  if (status < PPD_OK || status >= PPD_MAX_STATUS)
     return (_cupsLangString(cupsLangDefault(), _("Unknown")));
   else
     return (_cupsLangString(cupsLangDefault(), messages[status]));
@@ -1177,6 +1179,37 @@
     }
     else if (!strcmp(keyword, "JobPatchFile"))
     {
+     /*
+      * CUPS STR #3421: Check for "*JobPatchFile: int: string"
+      */
+
+      if (isdigit(*string & 255))
+      {
+        for (sptr = string + 1; isdigit(*sptr & 255); sptr ++);
+
+        if (*sptr == ':')
+        {
+         /*
+          * Found "*JobPatchFile: int: string"...
+          */
+
+          cg->ppd_status = PPD_BAD_VALUE;
+
+	  goto error;
+        }
+      }
+
+      if (!name[0])
+      {
+       /*
+        * Found "*JobPatchFile: string"...
+        */
+
+        cg->ppd_status = PPD_MISSING_OPTION_KEYWORD;
+
+	goto error;
+      }
+
       if (ppd->patches == NULL)
         ppd->patches = strdup(string);
       else
Index: cups/ppd.h
===================================================================
--- cups/ppd.h	(revision 8897)
+++ cups/ppd.h	(working copy)
@@ -115,7 +115,10 @@
   PPD_ILLEGAL_OPTION_KEYWORD,		/* Illegal option keyword string */
   PPD_ILLEGAL_TRANSLATION,		/* Illegal translation string */
   PPD_ILLEGAL_WHITESPACE,		/* Illegal whitespace character */
-  PPD_BAD_CUSTOM_PARAM			/* Bad custom parameter */
+  PPD_BAD_CUSTOM_PARAM,			/* Bad custom parameter */
+  PPD_MISSING_OPTION_KEYWORD,		/* Missing option keyword */
+  PPD_BAD_VALUE,			/* Bad value string */
+  PPD_MAX_STATUS			/* @private@ */
 } ppd_status_t;
 
 enum ppd_conform_e			/**** Conformance Levels @since CUPS 1.1.19/Mac OS X 10.3@ ****/
