summaryrefslogtreecommitdiff
path: root/network/nginx/CVE-2016-4450.diff
blob: 6f2c25b0c40aad847d05a10a3bbddc3ef324ae5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- src/os/unix/ngx_files.c
+++ 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;