From 0e98bb399f579caef19ad0d0a2147f7f20a26d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agentzh=20=28=E7=AB=A0=E4=BA=A6=E6=98=A5=29?= Date: Thu, 22 Dec 2011 11:36:43 +0800 Subject: [PATCH] checked in the gzip_ok_invalid_read_fix patch. --- patches/nginx-1.0.10-gzip_ok_invalid_read_fix.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 patches/nginx-1.0.10-gzip_ok_invalid_read_fix.patch diff --git a/patches/nginx-1.0.10-gzip_ok_invalid_read_fix.patch b/patches/nginx-1.0.10-gzip_ok_invalid_read_fix.patch new file mode 100644 index 0000000..dc61ef8 --- /dev/null +++ b/patches/nginx-1.0.10-gzip_ok_invalid_read_fix.patch @@ -0,0 +1,11 @@ +--- nginx-1.0.10/src/http/ngx_http_core_module.c 2011-11-01 21:45:33.000000000 +0800 ++++ nginx-1.0.10-patched/src/http/ngx_http_core_module.c 2011-12-22 11:08:02.546297974 +0800 +@@ -2070,7 +2070,7 @@ + * Opera: "gzip, deflate" + */ + +- if (ngx_memcmp(ae->value.data, "gzip,", 5) != 0 ++ if (ngx_memcmp(ae->value.data, "gzip,", ngx_min(ae->value.len, 5)) != 0 + && ngx_http_gzip_accept_encoding(&ae->value) != NGX_OK) + { + return NGX_DECLINED;