OSSP CVS Repository

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

ossp-pkg/xds/register.c 1.5 -> 1.6

--- register.c   2001/07/08 15:37:13     1.5
+++ register.c   2001/07/09 17:23:38     1.6
@@ -27,6 +27,7 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include <ctype.h>
 #include <assert.h>
 #include "internal.h"
 
@@ -41,6 +42,11 @@
     assert(engine != NULL);
     if (xds == NULL || name == NULL || engine == 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;
+        }
 
     /* Copy the name argument into our own memory. */
 

CVSTrac 2.0.1