Index: squid/src/gopher.c diff -c squid/src/gopher.c:1.162.2.7 squid/src/gopher.c:1.162.2.8 *** squid/src/gopher.c:1.162.2.7 Sat Nov 29 01:38:36 2003 --- squid/src/gopher.c Tue Jan 11 23:04:01 2005 *************** *** 342,347 **** --- 342,352 ---- if (gopherState->len != 0) { /* there is something left from last tx. */ xstrncpy(line, gopherState->buf, gopherState->len + 1); + if (gopherState->len + len > TEMP_BUF_SIZE) { + debug(10, 1) ("GopherHTML: Buffer overflow. Lost some data on URL: %s\n", + storeUrl(entry)); + len = TEMP_BUF_SIZE - gopherState->len; + } lpos = (char *) memccpy(line + gopherState->len, inbuf, '\n', len); if (lpos) *lpos = '\0';