You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by se...@apache.org on 2008/03/05 17:12:50 UTC

svn commit: r633902 - /webservices/axis2/trunk/c/util/src/uri.c

Author: senaka
Date: Wed Mar  5 08:12:47 2008
New Revision: 633902

URL: http://svn.apache.org/viewvc?rev=633902&view=rev
Log:
Fixing JIRA Issue AXIS2C-1016

Modified:
    webservices/axis2/trunk/c/util/src/uri.c

Modified: webservices/axis2/trunk/c/util/src/uri.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/uri.c?rev=633902&r1=633901&r2=633902&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/uri.c (original)
+++ webservices/axis2/trunk/c/util/src/uri.c Wed Mar  5 08:12:47 2008
@@ -572,17 +572,29 @@
         }
         /* literal IPv6 address */
         s = rsb + 1;
-        ++hostinfo;
+        if ((*(hostinfo + 1) >= '0' && *(hostinfo + 1) <= '9') ||
+             (*(hostinfo + 1) >= 'a' && *(hostinfo + 1) <= 'z') ||
+             (*(hostinfo + 1) >= 'A' && *(hostinfo + 1) <= 'Z'))
+        {
+            ++hostinfo;
+        }
+        else
+        {
+            axutil_uri_free(uri, env);
+            return NULL;
+        }
         v6_offset1 = 1;
     }
-    else if (*hostinfo == ':')
+    else if ((*hostinfo >= '0' && *hostinfo <= '9') ||
+             (*hostinfo >= 'a' && *hostinfo <= 'z') ||
+             (*hostinfo >= 'A' && *hostinfo <= 'Z'))
     {
-        axutil_uri_free(uri, env);
-        return NULL;
+        s = strchr(hostinfo, ':');
     }
     else
     {
-        s = strchr(hostinfo, ':');
+        axutil_uri_free(uri, env);
+        return NULL;
     }
     if (!s)
     {



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org