Re: cgicc and 64bit OS
"Stephen F. Booth" <[email protected]> Sat, 6 Nov 2004 09:12:10 -0500
| Newsgroups | gmane.comp.gcc.cgicc.bugs |
|---|---|
| Message-ID | <[email protected]> |
--===============2089186132== Content-Type: multipart/signed; boundary="nextPart1147382.nbBs5o052v"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1147382.nbBs5o052v Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thanks for reporting this- I've fixed it in CVS and it will be in the next = new=20 version. As far as uploading files to memory goes, I know it isn't the best practice= =2E =20 I just haven't gotten around to providing a file-based implementation. =20 However, I think that depending on how the web server handles file uploads= =20 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. > > [ivrom@mars pgml2]$ cat /etc/issue > Fedora Core release 2 (Tettnang) > Kernel \r on an \m > > [ivrom@mars 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 > [email protected] > http://lists.gnu.org/mailman/listinfo/bug-cgicc --nextPart1147382.nbBs5o052v Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBBjNu9golXBOamItMRAngmAJ9qiiRkYZf56Ec0sSzU+CWcV+WTlQCggoZy ++WwIAXi1q3E0JbUnjfMVp8= =f8S5 -----END PGP SIGNATURE----- --nextPart1147382.nbBs5o052v-- --===============2089186132== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ bug-cgicc mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-cgicc --===============2089186132==--