Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > by-pkgid > af9ae8ac8c38f7fcd19c61a2b7a1612c > files > 8

pam-0.99.8.1-20.1mdv2009.1.src.rpm

diff -ur Linux-PAM-0.99.8.1.orig/libpam/pam_misc.c Linux-PAM-0.99.8.1/libpam/pam_misc.c
--- Linux-PAM-0.99.8.1.orig/libpam/pam_misc.c	2006-06-14 23:20:48.000000000 +0200
+++ Linux-PAM-0.99.8.1/libpam/pam_misc.c	2009-03-19 21:41:35.000000000 +0100
@@ -59,10 +59,11 @@
 
      /* initialize table */
      for (i=1; i<256; table[i++] = '\0');
-     for (i=0; format[i] ; table[(int)format[i++]] = 'y');
+     for (i=0; format[i] ;
+	  table[(unsigned char)format[i++]] = 'y');
 
      /* look for first non-format char */
-     while (*from && table[(int)*from]) {
+     while (*from && table[(unsigned char)*from]) {
 	  ++from;
      }
 
@@ -92,7 +93,7 @@
             remains */
      } else if (*from) {
 	 /* simply look for next blank char */
-	 for (end=from; *end && !table[(int)*end]; ++end);
+	 for (end=from; *end && !table[(unsigned char)*end]; ++end);
      } else {
 	 return (*next = NULL);                    /* no tokens left */
      }