On Thu, Oct 30, 2008 at 5:39 AM, Valery Kholodkov <span dir="ltr">&lt;<a href="mailto:valery%2Bnginxru@grid.net.ru">valery+nginxru@grid.net.ru</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Yeah, I know about this problem. I&#39;ll fix it in next version. The better<br>
solution from my point of view sounds:<br>
<br>
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(u-&gt;output_file.offset + len &gt; ulcf-&gt;max_file_size)<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(u-&gt;output_file.offset + (off_t)len &gt; ulcf-&gt;max_file_size)<br>
<br>
Patch is attached.<br>
<div><div></div><div class="Wj3C7c"><br>
&gt; I was unable to compile the latest version (2.0.7) of the Nginx upload<br>
&gt; module on a 64-bit system. I tried with both Nginx 0.6.32 and <a href="http://0.7.19." target="_blank">0.7.19.</a><br>
&gt; I received a warning about a comparison of a signed and unsigned int and<br>
&gt; Nginx will abort compilation if a warning is encountered.<br>
&gt;<br>
&gt; I was able to successfully compile Nginx with the upload module by<br>
&gt; changing<br>
&gt; line 981 in ngx_http_upload_module.c from:<br>
&gt;<br>
&gt; &nbsp; &nbsp; if(u-&gt;output_file.offset + len &gt; ulcf-&gt;max_file_size)<br>
&gt;<br>
&gt; to:<br>
&gt;<br>
&gt; &nbsp; &nbsp; if((unsigned int)(u-&gt;output_file.offset + len) &gt; ulcf-&gt;max_file_size)<br>
&gt;<br>
&gt; My C is pretty rusty and I&#39;m hardly acquainted with the Nginx and upload<br>
&gt; module source.<br>
&gt; So my questions is: was this the right thing to do?<br>
<br>
</div></div>--<br>
Best regards,<br>
<font color="#888888">Valery Kholodkov</font></blockquote></div><br>Thanks Valery! I just put the upload module into production last night. So far so good! Thanks for all your hard work on it -- it&#39;s a much needed module.<br>
<br>