File: 0567.html

package info (click to toggle)
apache 1.3.0-5
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 6,488 kB
  • ctags: 6,702
  • sloc: ansic: 47,562; sh: 3,221; makefile: 1,382; perl: 1,346; cpp: 55
file content (84 lines) | stat: -rw-r--r-- 2,539 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!-- received="Tue Dec 30 14:53:37 1997 CST" -->
<!-- sent="Tue, 30 Dec 1997 13:30:56 -0700" -->
<!-- name="Marc Slemko" -->
<!-- email="marcs@znep.com" -->
<!-- subject="Re: Apache DoS attack?" -->
<!-- id="Pine.BSF.3.95.971230132752.2417U-100000@alive.znep.com" -->
<!-- inreplyto="Pine.BSF.3.95.971230122347.2417H-100000@alive.znep.com" -->
<html>
<head>
<title>Bugtraq archives for 4th quarter (Oct-Dec) 1997: Re: Apache DoS attack?</title>
</head>
<body bgcolor="#ffffff" text="#000000" link="#0000a0" vlink="a00000">
<h1>Re: Apache DoS attack?</h1>
Marc Slemko (<i>marcs@znep.com</i>)<br>
<i>Tue, 30 Dec 1997 13:30:56 -0700</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#567">[ date ]</a><a href="index.html#567">[ thread ]</a><a href="subject.html#567">[ subject ]</a><a href="author.html#567">[ author ]</a>
<!-- next="start" -->
<li> <b>Previous message:</b> <a href="0566.html">Jim Hribnak: "Re: Apache DoS attack?"</a>
<!-- nextthread="start" -->
</ul>
<!-- body="start" -->
<pre>
On Tue, 30 Dec 1997, Marc Slemko wrote:

[...]

&gt; Please see the patch Dean Gaudet has posted to bugtraq for the solution.

Since people are telling me that Dean's post has not made it yet and
asking for the patch, and I don't see it here yet, I am reposting his
patch for 1.2.  A similar thing applies to 1.3.

This patch has been applied to the Apache CVS tree and will be available
in a new release at some point in the reasonably near future.

Index: src/util.c
===================================================================
RCS file: /export/home/cvs/apache/src/util.c,v
retrieving revision 1.52.2.2
diff -u -r1.52.2.2 util.c
--- util.c      1997/06/27 01:47:47     1.52.2.2
+++ util.c      1997/12/30 18:09:15
@@ -328,14 +328,22 @@
     }
 }

-void no2slash(char *name) {
-    register int x,y;
+void no2slash(char *name)
+{
+    char *d, *s;

-    for(x=0; name[x];)
-        if(x &amp;&amp; (name[x-1] == '/') &amp;&amp; (name[x] == '/'))
-            for(y=x+1;name[y-1];y++)
-                name[y-1] = name[y];
-       else x++;
+    s = d = name;
+    while (*s) {
+        if ((*d++ = *s) == '/') {
+            do {
+                ++s;
+            } while (*s == '/');
+        }
+        else {
+            ++s;
+        }
+    }
+    *d = '\0';
 }

 char *make_dirstr(pool *p, const char *s, int n) {
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Previous message:</b> <a href="0566.html">Jim Hribnak: "Re: Apache DoS attack?"</a>
<!-- nextthread="start" -->
</ul>
</body>
</html>