[Rpm-maint] [Suse patch] Loosen character checks in specfile processing

Panu Matilainen pmatilai at redhat.com
Fri Jun 8 11:39:24 UTC 2007


This falls to the "post 4.4.2.1 i18n + localisation major rework" category 
really, but as it's such a trivial and small patch I can apply to 4.4.2.1 
if it makes people happy - your call. Michael?

 	- Panu -

---

Allow characters >127 that don't fit the current locale in the
specfile (e.g. latin1 in utf-8 locale).

--- ./build.c.orig	2004-10-17 19:00:10.000000000 +0000
+++ ./build.c	2005-12-19 17:52:25.000000000 +0000
@@ -87,8 +87,13 @@ static int isSpecFile(const char * specf
  	    /*@switchbreak@*/ break;
  /*@-boundsread@*/
  	default:
+#if 0
  	    if (checking && !(isprint(*s) || isspace(*s))) return 0;
  	    /*@switchbreak@*/ break;
+#else
+	    if (checking && !(isprint(*s) || isspace(*s)) && *(unsigned char *)s < 32) return 0;
+	    /*@switchbreak@*/ break;
+#endif
  /*@=boundsread@*/
  	}
      }



More information about the Rpm-maint mailing list