]> git.pld-linux.org Git - packages/squid.git/blame - squid-3.0.PRE3-coss-postmerge.patch
- fixes CAN-2005-0097
[packages/squid.git] / squid-3.0.PRE3-coss-postmerge.patch
CommitLineData
36aa8c36
JR
1Index: squid3/src/fs/coss/store_dir_coss.cc
2diff -c squid3/src/fs/coss/store_dir_coss.cc:1.48 squid3/src/fs/coss/store_dir_coss.cc:1.49
3*** squid3/src/fs/coss/store_dir_coss.cc:1.48 Wed Aug 27 15:19:38 2003
4--- squid3/src/fs/coss/store_dir_coss.cc Sat Aug 30 00:39:24 2003
5***************
6*** 861,867 ****
7
8 if (max_size > (max_offset>>10)) {
9 debug(47,0)("COSS block-size = %d bytes\n", 1<<blksz_bits);
10! debug(47,0)("COSS largest file offset = %llu KB\n", max_offset >> 10);
11 debug(47,0)("COSS cache_dir size = %d KB\n", max_size);
12 fatal("COSS cache_dir size exceeds largest offset\n");
13 }
14--- 861,867 ----
15
16 if (max_size > (max_offset>>10)) {
17 debug(47,0)("COSS block-size = %d bytes\n", 1<<blksz_bits);
18! debugs(47,0, "COSS largest file offset = " << (max_offset >> 10) << " KB");
19 debug(47,0)("COSS cache_dir size = %d KB\n", max_size);
20 fatal("COSS cache_dir size exceeds largest offset\n");
21 }
22Index: squid3/src/fs/coss/store_io_coss.cc
23diff -c squid3/src/fs/coss/store_io_coss.cc:1.23 squid3/src/fs/coss/store_io_coss.cc:1.24
24*** squid3/src/fs/coss/store_io_coss.cc:1.23 Wed Aug 27 15:19:38 2003
25--- squid3/src/fs/coss/store_io_coss.cc Sat Aug 30 00:39:24 2003
26***************
27*** 116,122 ****
28
29 /* Check if we have overflowed the disk .. */
30 /* SD->max_size is int, so cast to (off_t) *before* bit-shifting */
31! if ((SD->current_offset + allocsize) > ((off_t)SD->max_size << 10)) {
32 /*
33 * tried to allocate past the end of the disk, so wrap
34 * back to the beginning
35--- 116,122 ----
36
37 /* Check if we have overflowed the disk .. */
38 /* SD->max_size is int, so cast to (off_t) *before* bit-shifting */
39! if ((off_t)(SD->current_offset + allocsize) > ((off_t)SD->max_size << 10)) {
40 /*
41 * tried to allocate past the end of the disk, so wrap
42 * back to the beginning
43***************
44*** 414,420 ****
45 for (m = membufs.head; m; m = m->next) {
46 t = (CossMemBuf *)m->data;
47
48! if ((o >= t->diskstart) && (o < t->diskend))
49 break;
50 }
51
52--- 414,420 ----
53 for (m = membufs.head; m; m = m->next) {
54 t = (CossMemBuf *)m->data;
55
56! if ((o >= (off_t)t->diskstart) && (o < (off_t)t->diskend))
57 break;
58 }
59
60***************
61*** 665,671 ****
62 if (curfn == e->swap_filen)
63 *collision = 1; /* Mark an object alloc collision */
64
65! if ((o >= newmb->diskstart) && (o < newmb->diskend)) {
66 storeRelease(e);
67 numreleased++;
68 } else
69--- 665,671 ----
70 if (curfn == e->swap_filen)
71 *collision = 1; /* Mark an object alloc collision */
72
73! if ((o >= (off_t)newmb->diskstart) && (o < (off_t)newmb->diskend)) {
74 storeRelease(e);
75 numreleased++;
76 } else
This page took 0.069188 seconds and 4 git commands to generate.