Index: trunk/src/sh_suidchk.c
===================================================================
--- trunk/src/sh_suidchk.c	(revision 54)
+++ trunk/src/sh_suidchk.c	(revision 55)
@@ -519,5 +519,5 @@
 	  if (/*@-usedef@*/S_ISDIR(buf.st_mode)/*@+usedef@*/ &&
 	      (ShSuidchkExclude == NULL || 
-	      0 != strncmp(tmpcat, ShSuidchkExclude, (size_t) ExcludeLen)))
+	       0 != strcmp(tmpcat, ShSuidchkExclude)))
 	    {
 	      /* fs is a STATIC string
@@ -1118,18 +1118,12 @@
     SH_FREE(ShSuidchkExclude);
 
-  /* 1.8.1 add trailing slash
-   */
   ExcludeLen       = (int) sl_strlen(c);
-  if (c[ExcludeLen-1] != '/')
-    {
-      ExcludeLen++;
-      if ((ExcludeLen <= 0) || (ExcludeLen+1 <= 0)) /* may overflow */
-	{
-	  SL_RETURN(-1, _("sh_suidchk_set_exclude"));
-	}
+  if (c[ExcludeLen-1] == '/')
+    {
+      c[ExcludeLen-1] = '\0';
+      ExcludeLen--;
     }
   ShSuidchkExclude = SH_ALLOC((size_t) ExcludeLen + 1);
   (void) sl_strlcpy(ShSuidchkExclude, c, (size_t)(ExcludeLen + 1));
-  ShSuidchkExclude[ExcludeLen-1] = '/';
 
   SL_RETURN(0, _("sh_suidchk_set_exclude"));
