From bf2e5697e1a614745fb335aaaa9913bf1001ebfc Mon Sep 17 00:00:00 2001 From: "Yichun Zhang (agentzh)" Date: Wed, 8 May 2019 14:30:10 -0700 Subject: [PATCH] bugfix: win32/win64: the error log buffer size was merely 2048 bytes (now updated to 4096 bytes). applied the win32_max_err_str patch for the nginx core. --- patches/nginx-1.15.8-win32_max_err_str.patch | 15 +++++++++++++++ util/mirror-tarballs | 4 ++++ 2 files changed, 19 insertions(+) create mode 100644 patches/nginx-1.15.8-win32_max_err_str.patch diff --git a/patches/nginx-1.15.8-win32_max_err_str.patch b/patches/nginx-1.15.8-win32_max_err_str.patch new file mode 100644 index 0000000..8c3ba27 --- /dev/null +++ b/patches/nginx-1.15.8-win32_max_err_str.patch @@ -0,0 +1,15 @@ +diff --git a/src/os/win32/ngx_event_log.c b/src/os/win32/ngx_event_log.c +index e11ed1e8..dce8eddd 100644 +--- a/src/os/win32/ngx_event_log.c ++++ b/src/os/win32/ngx_event_log.c +@@ -8,7 +8,9 @@ + #include + + +-#define NGX_MAX_ERROR_STR 2048 ++#ifndef NGX_MAX_ERROR_STR ++#define NGX_MAX_ERROR_STR 4096 ++#endif + + + void ngx_cdecl diff --git a/util/mirror-tarballs b/util/mirror-tarballs index ea0f684..51156f4 100755 --- a/util/mirror-tarballs +++ b/util/mirror-tarballs @@ -34,6 +34,10 @@ cd nginx-$ver || exit 1 # patch the patch +echo "$info_txt applying the nginx-$main_ver-win32_max_err_str.patch" +patch -p1 < $root/patches/nginx-$main_ver-win32_max_err_str.patch || exit 1 +echo + answer=`$root/util/ver-ge "$main_ver" 1.13.3` if [ "$answer" = "N" ]; then echo "$info_txt applying the patch for nginx security advisory (CVE-2017-7529)"