[nginx] svn commit: r5046 - in branches/stable-1.2: . src/http/modules

mdounin at mdounin.ru mdounin at mdounin.ru
Sun Feb 10 03:52:26 UTC 2013


Author: mdounin
Date: 2013-02-10 03:52:26 +0000 (Sun, 10 Feb 2013)
New Revision: 5046
URL: http://trac.nginx.org/nginx/changeset/5046/nginx

Log:
Merge of r4966: gzip: fixed zlib memLevel adjusting.

An incorrect memLevel (lower than 1) might be passed to deflateInit2() if the
"gzip_hash" directive is set to a value less than the value of "gzip_window"
directive. This resulted in "deflateInit2() failed: -2" alert and an empty
reply.


Modified:
   branches/stable-1.2/
   branches/stable-1.2/src/http/modules/ngx_http_gzip_filter_module.c

Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2	2013-02-10 03:27:15 UTC (rev 5045)
+++ branches/stable-1.2	2013-02-10 03:52:26 UTC (rev 5046)

Property changes on: branches/stable-1.2
___________________________________________________________________
Modified: svn:mergeinfo
## -1 +1 ##
-/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4741,4754,4756-4771,4775,4777-4780,4782-4785,4795,4811-4820,4822-4824,4828-4835,4840-4844,4865-4872,4885-4887,4890-4896,4913-4925,4933-4934,4939,4944-4949,4961-4965,4973,4978,4984,5011
+/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4741,4754,4756-4771,4775,4777-4780,4782-4785,4795,4811-4820,4822-4824,4828-4835,4840-4844,4865-4872,4885-4887,4890-4896,4913-4925,4933-4934,4939,4944-4949,4961-4966,4973,4978,4984,5011
\ No newline at end of property
Modified: branches/stable-1.2/src/http/modules/ngx_http_gzip_filter_module.c
===================================================================
--- branches/stable-1.2/src/http/modules/ngx_http_gzip_filter_module.c	2013-02-10 03:27:15 UTC (rev 5045)
+++ branches/stable-1.2/src/http/modules/ngx_http_gzip_filter_module.c	2013-02-10 03:52:26 UTC (rev 5046)
@@ -497,6 +497,10 @@
             wbits--;
             memlevel--;
         }
+
+        if (memlevel < 1) {
+            memlevel = 1;
+        }
     }
 
     ctx->wbits = wbits;



More information about the nginx-devel mailing list