Mercurial > hg > nginx-quic
annotate auto/lib/pcre/makefile.msvc @ 4617:972642646f06
Rewrite: fixed escaping and possible segfault (ticket #162).
The following code resulted in incorrect escaping of uri and possible
segfault:
location / {
rewrite ^(.*) $1?c=$1;
return 200 "$uri";
}
If there were arguments in a rewrite's replacement string, and length was
actually calculated (due to duplicate captures as in the example above,
or variables present), the is_args flag was set and incorrectly copied
after length calculation. This resulted in escaping applied to the uri part
of the replacement, resulting in incorrect escaping. Additionally, buffer
was allocated without escaping expected, thus this also resulted in buffer
overrun and possible segfault.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 11 May 2012 13:19:22 +0000 |
parents | d620f497c50f |
children | bd828a14e017 |
rev | line source |
---|---|
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
288
diff
changeset
|
1 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
288
diff
changeset
|
2 # Copyright (C) Igor Sysoev |
4412 | 3 # Copyright (C) Nginx, Inc. |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
288
diff
changeset
|
4 |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
5 |
286
fc8dc489247e
nginx-0.0.2-2004-03-12-00:34:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
284
diff
changeset
|
6 CFLAGS = -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) |
2840
22c4c012c8c9
switch Win32 building to modern PCRE versions (starting from 7.1)
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
7 PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 |
2838
ecdc41bf2047
backout r2833: CURDIR was set to Unix style path
Igor Sysoev <igor@sysoev.ru>
parents:
2833
diff
changeset
|
10 pcre.lib: |
ecdc41bf2047
backout r2833: CURDIR was set to Unix style path
Igor Sysoev <igor@sysoev.ru>
parents:
2833
diff
changeset
|
11 cd $(PCRE) |
ecdc41bf2047
backout r2833: CURDIR was set to Unix style path
Igor Sysoev <igor@sysoev.ru>
parents:
2833
diff
changeset
|
12 |
2840
22c4c012c8c9
switch Win32 building to modern PCRE versions (starting from 7.1)
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
13 cl -nologo -c $(CFLAGS) -I . $(PCREFLAGS) pcre_*.c |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
14 |
2840
22c4c012c8c9
switch Win32 building to modern PCRE versions (starting from 7.1)
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
15 link -lib -out:pcre.lib -verbose:lib pcre_*.obj |
288
f81d075ad172
nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
286
diff
changeset
|
16 |
f81d075ad172
nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents:
286
diff
changeset
|
17 pcre.h: |
2838
ecdc41bf2047
backout r2833: CURDIR was set to Unix style path
Igor Sysoev <igor@sysoev.ru>
parents:
2833
diff
changeset
|
18 cd $(PCRE) |
2840
22c4c012c8c9
switch Win32 building to modern PCRE versions (starting from 7.1)
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
19 |
22c4c012c8c9
switch Win32 building to modern PCRE versions (starting from 7.1)
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
20 copy /y pcre.h.generic pcre.h |
22c4c012c8c9
switch Win32 building to modern PCRE versions (starting from 7.1)
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
21 copy /y config.h.generic config.h |
22c4c012c8c9
switch Win32 building to modern PCRE versions (starting from 7.1)
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
22 copy /y pcre_chartables.c.dist pcre_chartables.c |