tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50339] mod_jk parsing error if workers.properties contains whitespaces
Date Mon, 29 Nov 2010 17:08:02 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50339

--- Comment #2 from Rainer Jung <rainer.jung@kippdata.de> 2010-11-29 12:07:58 EST ---
Can you please try the following patch:

Index: common/jk_map.c
===================================================================
--- common/jk_map.c     (revision 1032021)
+++ common/jk_map.c     (working copy)
@@ -630,6 +630,7 @@
 static size_t trim(char *s)
 {
     size_t i;
+    size_t off;

     /* check for empty strings */
     if (!(i = strlen(s)))
@@ -646,7 +647,10 @@
          isspace((int)((unsigned char)s[i])); i++);

     if (i > 0) {
-        strcpy(s, &s[i]);
+        for (off = i; '\0' != s[i]; i++); {
+            s[i - off] = s[i];
+        }
+        s[i - off] = s[i];
     }

     return strlen(s);

Thanks!

Rainer

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message