File cups-2.2.7-CVE-2020-3898.patch of Package cups.28152

--- cups/ppd.c.orig	2018-03-23 04:48:36.000000000 +0100
+++ cups/ppd.c	2020-04-06 11:52:56.257015366 +0200
@@ -1753,8 +1753,7 @@ _ppdOpen(
                      constraint->choice1, constraint->option2,
 		     constraint->choice2))
       {
-        case 0 : /* Error */
-	case 1 : /* Error */
+	default : /* Error */
 	    pg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
 	    goto error;
 
--- ppdc/ppdc-source.cxx.orig	2018-03-23 04:48:36.000000000 +0100
+++ ppdc/ppdc-source.cxx	2020-04-06 11:59:29.061404709 +0200
@@ -1746,14 +1746,16 @@ ppdcSource::get_resolution(ppdcFile *fp)
 
   switch (sscanf(name, "%dx%d", &xdpi, &ydpi))
   {
-    case 0 :
-        _cupsLangPrintf(stderr,
-	                _("ppdc: Bad resolution name \"%s\" on line %d of "
-			  "%s."), name, fp->line, fp->filename);
-        break;
     case 1 :
         ydpi = xdpi;
 	break;
+    case 2 :
+        break;
+    default :
+        _cupsLangPrintf(stderr,
+                       _("ppdc: Bad resolution name \"%s\" on line %d of "
+                         "%s."), name, fp->line, fp->filename);
+        break;
   }
 
   // Create the necessary PS commands...
openSUSE Build Service is sponsored by