Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > c3f48b97eea7ea342086686527f89d24 > files > 7

apache-1.3.29-1.4.100mdk.src.rpm

===================================================================
RCS file: /home/cvspublic/apache-1.3/src/modules/proxy/proxy_http.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -r1.106 -r1.107
--- apache-1.3/src/modules/proxy/proxy_http.c	2004/03/29 17:47:15	1.106
+++ apache-1.3/src/modules/proxy/proxy_http.c	2004/06/11 07:54:38	1.107
@@ -485,6 +485,13 @@
         content_length = ap_table_get(resp_hdrs, "Content-Length");
         if (content_length != NULL) {
             c->len = ap_strtol(content_length, NULL, 10);
+
+	    if (c->len < 0) {
+		ap_kill_timeout(r);
+		return ap_proxyerror(r, HTTP_BAD_GATEWAY, ap_pstrcat(r->pool,
+				     "Invalid Content-Length from remote server",
+                                      NULL));
+	    }
         }
 
     }