OSSP CVS Repository

ossp - Difference in ossp-pkg/xds/unregister.c versions 1.3 and 1.4
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/xds/unregister.c 1.3 -> 1.4

--- unregister.c 2001/07/08 16:01:37     1.3
+++ unregister.c 2001/07/09 17:23:38     1.4
@@ -27,6 +27,7 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include <ctype.h>
 #include <assert.h>
 #include "internal.h"
 
@@ -41,6 +42,11 @@
     assert(name != NULL);
     if (xds == NULL || name == NULL)
         return XDS_ERR_INVALID_ARG;
+    for(pos = 0; name[pos] != '\0'; ++pos)
+        {
+        if (!isalnum(name[pos]) && name[pos] != '-' && name[pos] != '_')
+            return XDS_ERR_INVALID_ARG;
+        }
 
     /* Find the entry we're supposed to delete. */
 

CVSTrac 2.0.1