annotate auto/lib/pcre/makefile.bcc @ 6574:7eb19447b2de

Core: skip special buffers on writing (ticket #981). A special last buffer with cl->buf->pos set to NULL can be present in a chain when writing request body if chunked encoding was used. This resulted in a NULL pointer dereference if it happened to be the only buffer left after a do...while loop iteration in ngx_write_chain_to_file(). The problem originally appeared in nginx 1.3.9 with chunked encoding support. Additionally, rev. 3832b608dc8d (nginx 1.9.13) changed the minimum number of buffers to trigger this from IOV_MAX (typically 1024) to NGX_IOVS_PREALLOCATE (typically 64). Fix is to skip such buffers in ngx_chain_to_iovec(), much like it is done in other places.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 31 May 2016 05:13:30 +0300
parents 2fda9065d0f4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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: 297
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: 297
diff changeset
2 # Copyright (C) Igor Sysoev
4412
d620f497c50f Copyright updated.
Maxim Konovalov <maxim@nginx.com>
parents: 2840
diff changeset
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: 297
diff changeset
4
297
ee394e997c77 nginx-0.0.3-2004-03-29-21:43:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
5
593
425af804d968 nginx-0.3.18-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 503
diff changeset
6 CFLAGS = -q -O2 -tWM -w-8004 $(CPU_OPT)
5343
bd828a14e017 Updated PCRE used for win32 builds.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
7 PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 \
bd828a14e017 Updated PCRE used for win32 builds.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4412
diff changeset
8 -DSUPPORT_PCRE8 -DHAVE_MEMMOVE
297
ee394e997c77 nginx-0.0.3-2004-03-29-21:43:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
9
ee394e997c77 nginx-0.0.3-2004-03-29-21:43:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
10
2838
ecdc41bf2047 backout r2833: CURDIR was set to Unix style path
Igor Sysoev <igor@sysoev.ru>
parents: 2833
diff changeset
11 pcre.lib:
ecdc41bf2047 backout r2833: CURDIR was set to Unix style path
Igor Sysoev <igor@sysoev.ru>
parents: 2833
diff changeset
12 cd $(PCRE)
ecdc41bf2047 backout r2833: CURDIR was set to Unix style path
Igor Sysoev <igor@sysoev.ru>
parents: 2833
diff changeset
13
2840
22c4c012c8c9 switch Win32 building to modern PCRE versions (starting from 7.1)
Igor Sysoev <igor@sysoev.ru>
parents: 2838
diff changeset
14 bcc32 -c $(CFLAGS) -I. $(PCREFLAGS) pcre_*.c
297
ee394e997c77 nginx-0.0.3-2004-03-29-21:43:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
15
5359
2fda9065d0f4 Win32: Borland C compatibility fixes.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5343
diff changeset
16 copy /y nul pcre.lst
2fda9065d0f4 Win32: Borland C compatibility fixes.
Maxim Dounin <mdounin@mdounin.ru>
parents: 5343
diff changeset
17 for %n in (*.obj) do @echo +%n ^^& >> pcre.lst
2840
22c4c012c8c9 switch Win32 building to modern PCRE versions (starting from 7.1)
Igor Sysoev <igor@sysoev.ru>
parents: 2838
diff changeset
18 echo + >> pcre.lst
297
ee394e997c77 nginx-0.0.3-2004-03-29-21:43:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
19
2840
22c4c012c8c9 switch Win32 building to modern PCRE versions (starting from 7.1)
Igor Sysoev <igor@sysoev.ru>
parents: 2838
diff changeset
20 tlib pcre.lib @pcre.lst
297
ee394e997c77 nginx-0.0.3-2004-03-29-21:43:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
21
ee394e997c77 nginx-0.0.3-2004-03-29-21:43:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
22 pcre.h:
2838
ecdc41bf2047 backout r2833: CURDIR was set to Unix style path
Igor Sysoev <igor@sysoev.ru>
parents: 2833
diff changeset
23 cd $(PCRE)
2840
22c4c012c8c9 switch Win32 building to modern PCRE versions (starting from 7.1)
Igor Sysoev <igor@sysoev.ru>
parents: 2838
diff changeset
24
22c4c012c8c9 switch Win32 building to modern PCRE versions (starting from 7.1)
Igor Sysoev <igor@sysoev.ru>
parents: 2838
diff changeset
25 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
26 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
27 copy /y pcre_chartables.c.dist pcre_chartables.c