]> git.pld-linux.org Git - packages/squid.git/blob - squid-2.5.STABLE7-gopher_html_parsing.patch
- ...and CAN-2005-0096
[packages/squid.git] / squid-2.5.STABLE7-gopher_html_parsing.patch
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';
This page took 0.022923 seconds and 3 git commands to generate.