You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2005/01/05 22:23:06 UTC

svn commit: r124277 - /httpd/httpd/trunk/modules/proxy/proxy_connect.c

Author: wrowe
Date: Wed Jan  5 13:23:03 2005
New Revision: 124277

URL: http://svn.apache.org/viewcvs?view=rev&rev=124277
Log:

  Fix a signedness issue that revealed a serious bug, the 'i' was
  reused for character indexing within this loop.

Modified:
   httpd/httpd/trunk/modules/proxy/proxy_connect.c

Modified: httpd/httpd/trunk/modules/proxy/proxy_connect.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/proxy/proxy_connect.c?view=diff&rev=124277&p1=httpd/httpd/trunk/modules/proxy/proxy_connect.c&r1=124276&p2=httpd/httpd/trunk/modules/proxy/proxy_connect.c&r2=124277
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_connect.c	(original)
+++ httpd/httpd/trunk/modules/proxy/proxy_connect.c	Wed Jan  5 13:23:03 2005
@@ -86,7 +86,7 @@
     apr_pollset_t *pollset;
     apr_pollfd_t pollfd;
     const apr_pollfd_t *signalled;
-    apr_int32_t pollcnt;
+    apr_int32_t pollcnt, pi;
     apr_int16_t pollevent;
     apr_sockaddr_t *uri_addr, *connect_addr;
 
@@ -290,8 +290,8 @@
                      "proxy: CONNECT: woke from select(), i=%d", pollcnt);
 #endif
 
-        for (i = 0; i < pollcnt; i++) {
-            const apr_pollfd_t *cur = &signalled[i];
+        for (pi = 0; pi < pollcnt; pi++) {
+            const apr_pollfd_t *cur = &signalled[pi];
 
             if (cur->desc.s == sock) {
                 pollevent = cur->rtnevents;
@@ -341,7 +341,8 @@
                         i = nbytes;
 #ifdef DEBUGGING
                         ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
-                                     "proxy: CONNECT: read %d from client", i);
+                                     "proxy: CONNECT: read %d from client", 
+                                     );
 #endif
                         while(i > 0)
                         {