tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r697529 - /tomcat/connectors/trunk/jk/native/common/jk_util.c
Date Sun, 21 Sep 2008 15:39:35 GMT
Author: mturk
Date: Sun Sep 21 08:39:35 2008
New Revision: 697529

URL: http://svn.apache.org/viewvc?rev=697529&view=rev
Log:
Make sure only single digits are taken for boolean values

Modified:
    tomcat/connectors/trunk/jk/native/common/jk_util.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?rev=697529&r1=697528&r2=697529&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Sun Sep 21 08:39:35 2008
@@ -324,13 +324,13 @@
     else if (!strcasecmp(v, "off") ||
              *v == 'F' || *v == 'f' ||
              *v == 'N' || *v == 'n' ||
-             *v == '0') {
+            (*v == '0' && *(v + 1) == '\0')) {
         return 0;
     }
     else if (!strcasecmp(v, "on") ||
              *v == 'T' || *v == 't' ||
              *v == 'Y' || *v == 'y' ||
-             *v == '1') {
+            (*v == '1' && *(v + 1) == '\0')) {
         return 1;
     }
     return def;



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


Mime
View raw message