chuck 97/06/04 14:20:28
Modified: src/modules/proxy proxy_util.c Log: Final proxy cleanups for release. Change errant memchr call to memset. Check for NULL read fd in proxy_send_fb() so we minimize risk of a coredump after a timeout on the origin host connection. Revision Changes Path 1.17 +2 -2 apache/src/modules/proxy/proxy_util.c Index: proxy_util.c =================================================================== RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_util.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C3 -r1.16 -r1.17 *** proxy_util.c 1997/05/31 22:43:00 1.16 --- proxy_util.c 1997/06/04 21:20:27 1.17 *************** *** 399,405 **** */ hard_timeout("proxy send body", r); ! while (!con->aborted) { n = bread(f, buf, IOBUFSIZE); if (n == -1) /* input error */ { --- 399,405 ---- */ hard_timeout("proxy send body", r); ! while (!con->aborted && f != NULL) { n = bread(f, buf, IOBUFSIZE); if (n == -1) /* input error */ { *************** *** 717,723 **** ipaddr = inet_addr(host); hp = gethostbyaddr((char *)&ipaddr, sizeof(u_long), AF_INET); if (hp == NULL) { ! memchr(&hpbuf, 0, sizeof(hpbuf)); hpbuf.h_name = 0; hpbuf.h_addrtype = AF_INET; hpbuf.h_length = sizeof(u_long); --- 717,723 ---- ipaddr = inet_addr(host); hp = gethostbyaddr((char *)&ipaddr, sizeof(u_long), AF_INET); if (hp == NULL) { ! memset(&hpbuf, 0, sizeof(hpbuf)); hpbuf.h_name = 0; hpbuf.h_addrtype = AF_INET; hpbuf.h_length = sizeof(u_long);