]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
ab: Fix broken error messages after resolver or connect() failures.
authorJeff Trawick <trawick@apache.org>
Wed, 29 Jul 2009 15:15:38 +0000 (15:15 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 29 Jul 2009 15:15:38 +0000 (15:15 +0000)
The APR error code was truncated because ab used an incorrect data
type.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@798943 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
support/ab.c

diff --git a/CHANGES b/CHANGES
index facc56a983cebe28a6535693a01dccf71ce0bbad..6c14df8c42f004183a8b0b34bc5c7154e1f7a6d1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.3.3
 
+  *) ab: Fix broken error messages after resolver or connect() failures.
+     [Jeff Trawick]
+
   *) SECURITY: CVE-2009-1890 (cve.mitre.org) 
      Fix a potential Denial-of-Service attack against mod_proxy in a
      reverse proxy configuration, where a remote attacker can force a
index 5ce6861ae3c80774f53e1dd7f6fde468fadcaaa7..48a3e46c0286803de3e6365285db31cd7ae6db96 100644 (file)
@@ -1548,7 +1548,8 @@ static void read_connection(struct connection * c)
 static void test(void)
 {
     apr_time_t stoptime;
-    apr_int16_t rv;
+    apr_int16_t rtnev;
+    apr_status_t rv;
     int i;
     apr_status_t status;
     int snprintf_res = 0;
@@ -1719,7 +1720,7 @@ static void test(void)
             if (c->state == STATE_UNCONNECTED)
                 continue;
 
-            rv = next_fd->rtnevents;
+            rtnev = next_fd->rtnevents;
 
 #ifdef USE_SSL
             if (c->state == STATE_CONNECTED && c->ssl && SSL_in_init(c->ssl)) {
@@ -1740,9 +1741,9 @@ static void test(void)
              * connection is done and we loop here endlessly calling
              * apr_poll().
              */
-            if ((rv & APR_POLLIN) || (rv & APR_POLLPRI) || (rv & APR_POLLHUP))
+            if ((rtnev & APR_POLLIN) || (rtnev & APR_POLLPRI) || (rtnev & APR_POLLHUP))
                 read_connection(c);
-            if ((rv & APR_POLLERR) || (rv & APR_POLLNVAL)) {
+            if ((rtnev & APR_POLLERR) || (rtnev & APR_POLLNVAL)) {
                 bad++;
                 err_except++;
                 /* avoid apr_poll/EINPROGRESS loop on HP-UX, let recv discover ECONNREFUSED */
@@ -1754,7 +1755,7 @@ static void test(void)
                 }
                 continue;
             }
-            if (rv & APR_POLLOUT) {
+            if (rtnev & APR_POLLOUT) {
                 if (c->state == STATE_CONNECTING) {
                     rv = apr_socket_connect(c->aprsock, destsa);
                     if (rv != APR_SUCCESS) {