Barry Sprajc - 2019-12-24

Thank you for letting me know Marc.
I wrote that code so long ago I forgot all about it. :)

Barry Sprajc

Sent from my iPhone

On Dec 24, 2019, at 2:41 AM, Marc Le Douarain mavati@users.sourceforge.net wrote:

[bugs:#7] Loop bug in read header when compiled on 64 bits

Status: open
Group: v1.0_(example)
Created: Tue Dec 24, 2019 10:40 AM UTC by Marc Le Douarain
Last Updated: Tue Dec 24, 2019 10:40 AM UTC
Owner: nobody

Hello,

After a little time, I've found a bug when used on 64 bits architecture, in file "embedhttp.cpp", line 343.

int ehttp:: read_header( int fd, void *cookie, string &header, string &message )
{

header="";
// unsigned int offset=0;
// REPLACE WITH :
size_t offset=0;

while((offset=header.find("\r\n\r\n"))==string::npos )
{
input_buffer[0]=0;
After this correction, working like a charm since a long time! (used on an old project)
On 64 bits, size_t doesn't equals "unsigned int", so test always false... not easy vicious bug, which we don't expect!
Thanks for the work.
Marc.

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/ehttpd/bugs/7/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

 

Related

Bugs: #7