File cups-2.2.7-CVE-2022-26691.patch of Package cups.29369

--- scheduler/cert.c.orig	2018-03-23 04:48:36.000000000 +0100
+++ scheduler/cert.c	2022-05-20 12:24:03.612609659 +0200
@@ -443,6 +443,12 @@ ctcompare(const char *a,		/* I - First s
     a ++;
     b ++;
   }
+  // the while loop finishes when not ( *a != '\0' and *b != '\0' )
+  // so it finishes when *a == '\0' or *b == '\0' so after the while loop
+  // either both *a and *b == '\0', or one points inside a string,
+  // so when *a != '\0' or *b != '\0' the two strings differ:
+  if (*a || *b)
+    result = 1;
 
   return (result);
 }
openSUSE Build Service is sponsored by