bug-cgicc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-cgicc] cgicc and 64bit OS


From: Stephen F. Booth
Subject: Re: [bug-cgicc] cgicc and 64bit OS
Date: Sat, 6 Nov 2004 09:12:10 -0500
User-agent: KMail/1.7

Thanks for reporting this- I've fixed it in CVS and it will be in the next new 
version.

As far as uploading files to memory goes, I know it isn't the best practice.  
I just haven't gotten around to providing a file-based implementation.  
However, I think that depending on how the web server handles file uploads 
and CGIs, the file may be in memory before the CGI is even executed.

Stephen

On Wednesday 27 October 2004 10:49, Vyacheslav Ignatyuk wrote:
> cgicc improperly handles multipart/form-data on 64bit OS.
>
> address@hidden pgml2]$ cat /etc/issue
> Fedora Core release 2 (Tettnang)
> Kernel \r on an \m
>
> address@hidden pgml2]$ uname -a
> Linux mars 2.6.5-1.358 #1 Sat May 8 09:01:26 EDT 2004 x86_64 x86_64 x86_64
> GNU/Linux
>
>
> Warnings are issued during compilation:
>
> CgiUtils.cpp: In function `std::string cgicc::extractBetween(const
>    std::string&, const std::string&, const std::string&)':
> CgiUtils.cpp:217: warning: comparison is always true due to limited range
> of data type
> CgiUtils.cpp:220: warning: comparison is always true due to limited range
> of data type
>
>
> Trouble caused by
> std::string cgicc::extractBetween(const std::string&,
> const std::string&, const std::string&) function.
>
> local variables "start" and "limit" originally have type unsigned int and
> should be changed to the same size type is used by std::string.
>
> So line
>   unsigned int start, limit;
> should be replaced with this one
>   std::string::size_type start, limit;
>
> This is the simplest way to get gid of this problem.
> I didn't check full source tree but IMHO all local counters should not be
> declared  as unsigned int or unsigned long. Better to use size_t or
> std::STL_CONTAINER::sitze_type typedef.
>
> Thanks
> Vyacheslav Ignatyuk
>
> PS: Is this good idea to fetch file is being uploaded into memory
> (std::string)? We usually upload huge files so there is a problem. I know
> otherwise we'll got a problem with temporary files but cgicc::Cgicc class
> might provide garbage collection in destructor.
> Thanks again
>
>
>
>
> _______________________________________________
> bug-cgicc mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-cgicc

Attachment: pgpIN1kaxrEA2.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]