]>
Commit | Line | Data |
---|---|---|
298c741d | 1 | Index: squid/src/gopher.c |
2 | diff -c squid/src/gopher.c:1.162.2.7 squid/src/gopher.c:1.162.2.8 | |
3 | *** squid/src/gopher.c:1.162.2.7 Sat Nov 29 01:38:36 2003 | |
4 | --- squid/src/gopher.c Tue Jan 11 23:04:01 2005 | |
5 | *************** | |
6 | *** 342,347 **** | |
7 | --- 342,352 ---- | |
8 | if (gopherState->len != 0) { | |
9 | /* there is something left from last tx. */ | |
10 | xstrncpy(line, gopherState->buf, gopherState->len + 1); | |
11 | + if (gopherState->len + len > TEMP_BUF_SIZE) { | |
12 | + debug(10, 1) ("GopherHTML: Buffer overflow. Lost some data on URL: %s\n", | |
13 | + storeUrl(entry)); | |
14 | + len = TEMP_BUF_SIZE - gopherState->len; | |
15 | + } | |
16 | lpos = (char *) memccpy(line + gopherState->len, inbuf, '\n', len); | |
17 | if (lpos) | |
18 | *lpos = '\0'; |