<div dir="ltr"><div>Hello, can you please send me the unsubscribe to the mailing list link? I want to connect with my other email</div><div>Thank you</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Jun 5, 2025 at 12:35 AM Maxim Dounin <<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">details: <a href="http://freenginx.org/hg/nginx/rev/f5928c2e47c5" rel="noreferrer" target="_blank">http://freenginx.org/hg/nginx/rev/f5928c2e47c5</a><br>
branches: <br>
changeset: 9376:f5928c2e47c5<br>
user: Maxim Dounin <<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>><br>
date: Thu Jun 05 02:52:31 2025 +0300<br>
description:<br>
Postpone filter: fixed incorrect content length check.<br>
<br>
The code in ngx_http_postpone_filter_in_memory() used to assign<br>
r->headers_out.content_length_n to a size_t variable before comparison,<br>
which can lead to incorrect results on 32-bit platforms.<br>
<br>
Fix is to compare r->headers_out.content_length_n before conversion<br>
to size_t.<br>
<br>
Found with MSVC with C4244 warnings (conversion from 'type1' to 'type2',<br>
possible loss of data) enabled.<br>
<br>
diffstat:<br>
<br>
src/http/ngx_http_postpone_filter_module.c | 10 +++++++---<br>
1 files changed, 7 insertions(+), 3 deletions(-)<br>
<br>
diffs (25 lines):<br>
<br>
diff --git a/src/http/ngx_http_postpone_filter_module.c b/src/http/ngx_http_postpone_filter_module.c<br>
--- a/src/http/ngx_http_postpone_filter_module.c<br>
+++ b/src/http/ngx_http_postpone_filter_module.c<br>
@@ -194,14 +194,18 @@ ngx_http_postpone_filter_in_memory(ngx_h<br>
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);<br>
<br>
if (r->headers_out.content_length_n != -1) {<br>
- len = r->headers_out.content_length_n;<br>
<br>
- if (len > clcf->subrequest_output_buffer_size) {<br>
+ if (r->headers_out.content_length_n<br>
+ > (off_t) clcf->subrequest_output_buffer_size)<br>
+ {<br>
ngx_log_error(NGX_LOG_ERR, c->log, 0,<br>
- "too big subrequest response: %uz", len);<br>
+ "too big subrequest response: %O",<br>
+ r->headers_out.content_length_n);<br>
return NGX_ERROR;<br>
}<br>
<br>
+ len = (size_t) r->headers_out.content_length_n;<br>
+<br>
} else {<br>
len = clcf->subrequest_output_buffer_size;<br>
}<br>
</blockquote></div>