[PATCH] Image filter: fixed sharpen parsing

J Carter jordanc.carter at outlook.com
Sun Dec 31 03:51:40 UTC 2023


# HG changeset patch
# User J Carter <jordanc.carter at outlook.com>
# Date 1703993644 0
#      Sun Dec 31 03:34:04 2023 +0000
# Node ID 1eaf9f76184f849fb21c5d2d543f2aa2df3be40c
# Parent  ee40e2b1d0833b46128a357fbc84c6e23be9be07
Image filter: fixed sharpen parsing.

Previously non numeric values were read as 0. This patch makes such
values an error.

diff -r ee40e2b1d083 -r 1eaf9f76184f src/http/modules/ngx_http_image_filter_module.c
--- a/src/http/modules/ngx_http_image_filter_module.c	Mon Dec 25 21:15:48 2023 +0400
+++ b/src/http/modules/ngx_http_image_filter_module.c	Sun Dec 31 03:34:04 2023 +0000
@@ -1639,7 +1639,7 @@
     }
 
     if (cv.lengths == NULL) {
-        n = ngx_http_image_filter_value(&value[1]);
+        n = ngx_atoi(value[1].data, value[1].len);
 
         if (n < 0) {
             ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,


More information about the nginx-devel mailing list