axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sen...@apache.org
Subject svn commit: r633902 - /webservices/axis2/trunk/c/util/src/uri.c
Date Wed, 05 Mar 2008 16:12:50 GMT
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


Mime
View raw message