aboutsummaryrefslogtreecommitdiffstats
path: root/main/nginx/CVE-2016-4450.patch
blob: c5d6b16623cc23cebf589f78a1dda6d414065b2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- a/src/os/unix/ngx_files.c
+++ b/src/os/unix/ngx_files.c
@@ -183,6 +183,12 @@ ngx_write_chain_to_file(ngx_file_t *file
         /* create the iovec and coalesce the neighbouring bufs */
 
         while (cl && vec.nelts < IOV_MAX) {
+
+            if (ngx_buf_special(cl->buf)) {
+                cl = cl->next;
+                continue;
+            }
+
             if (prev == cl->buf->pos) {
                 iov->iov_len += cl->buf->last - cl->buf->pos;