https://bugs.internet2.edu/jira/browse/CPPXT-38
authorcantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Mon, 24 Aug 2009 19:35:43 +0000 (19:35 +0000)
committercantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Mon, 24 Aug 2009 19:35:43 +0000 (19:35 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/branches/REL_1@637 de75baf8-a10c-0410-a50a-987c0e22f00f

xmltooling/util/URLEncoder.cpp

index d646251..55a8187 100644 (file)
@@ -43,7 +43,7 @@ void URLEncoder::decode(char* s) const
 
     for(x=0,y=0;s[y];++x,++y)
     {
-        if((s[x] = s[y]) == '%' && s[y+1] && s[y+2])
+        if((s[x] = s[y]) == '%' && isxdigit(s[y+1]) && isxdigit(s[y+2]))
         {
             s[x] = x2c(&s[y+1]);
             y+=2;