File cups-filters-1.0.58-CVE-2015-2265.patch of Package cups-filters.1694

--- utils/cups-browsed.c	2015-03-12 13:42:32.000000000 +0100
+++ utils/cups-browsed.c	2015-03-12 13:42:10.000000000 +0100
@@ -629,10 +629,12 @@ remove_bad_chars(const char *str_orig, /
     if (((str[i] >= 'A') && (str[i] <= 'Z')) ||
 	((str[i] >= 'a') && (str[i] <= 'z')) ||
 	((str[i] >= '0') && (str[i] <= '9')) ||
-	(mode == 1 && (str[i] == '/' || str[i] == '_' ||
+	str[i] == '_' ||
+	(mode == 1 && (str[i] == '/' ||
 		       str[i] == '.' || str[i] == ','))) {
-      /* Letter or number, keep it */
+      /* Allowed character, keep it */
       havedash = 0;
+      str[j] = str[i];
     } else {
       /* Replace all other characters by a single '-' */
       if (havedash == 1)
openSUSE Build Service is sponsored by