*** apache_base:[src.main]buff.c;1 Mon Aug 23 11:38:21 1999 --- apache_cur:[src.main]buff.c;5 Mon Aug 23 11:38:04 1999 *************** *** 79,86 **** --- 79,92 ---- * plus two extra characters. */ #ifndef CHUNK_HEADER_SIZE + #if DEFAULT_BUFSIZE > 65767 + #define CHUNK_HEADER_SIZE(12) + #elif DEFAULT_BUFSIZE > 4096 + #define CHUNK_HEADER_SIZE (6) + #else #define CHUNK_HEADER_SIZE (5) #endif + #endif /* bwrite()s of greater than this size can result in a large_write() call, *************** *** 509,514 **** --- 515,524 ---- * \r back in. */ strp = &fb->outbase[fb->outchunk + i]; + if ( (i+2) > CHUNK_HEADER_SIZE ) { + fprintf(stderr, "Bugcheck - chunk header overflow: '%s' more than %d\n", + &fb->outbase[fb->outchunk], CHUNK_HEADER_SIZE - 2 ); + } while (i < CHUNK_HEADER_SIZE - 2) { *strp++ = ' '; ++i;