On Thu, Oct 30, 2008 at 5:39 AM, Valery Kholodkov <span dir="ltr"><<a href="mailto:valery%2Bnginxru@grid.net.ru">valery+nginxru@grid.net.ru</a>></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'll fix it in next version. The better<br>
solution from my point of view sounds:<br>
<br>
- if(u->output_file.offset + len > ulcf->max_file_size)<br>
+ if(u->output_file.offset + (off_t)len > ulcf->max_file_size)<br>
<br>
Patch is attached.<br>
<div><div></div><div class="Wj3C7c"><br>
> I was unable to compile the latest version (2.0.7) of the Nginx upload<br>
> 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>
> I received a warning about a comparison of a signed and unsigned int and<br>
> Nginx will abort compilation if a warning is encountered.<br>
><br>
> I was able to successfully compile Nginx with the upload module by<br>
> changing<br>
> line 981 in ngx_http_upload_module.c from:<br>
><br>
> if(u->output_file.offset + len > ulcf->max_file_size)<br>
><br>
> to:<br>
><br>
> if((unsigned int)(u->output_file.offset + len) > ulcf->max_file_size)<br>
><br>
> My C is pretty rusty and I'm hardly acquainted with the Nginx and upload<br>
> module source.<br>
> 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's a much needed module.<br>
<br>