libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Find a bug in libmicrohttpd-0.9.9 and provide the fi


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Find a bug in libmicrohttpd-0.9.9 and provide the fix
Date: Tue, 06 May 2014 09:33:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10

Hi!

0.9.9 is a rather old release at this point.  This bug has already been
fixed in one of the 25 releases that were published since then.  You
might want to update to a more recent version of your OS, if you can.


Happy hacking!

Christian

On 05/05/2014 05:56 AM, 钱在晨 wrote:
> Dear Sir/MadamWhen using libmicrohttpd-0.9.9 in our program on redhat 6u, we 
> find the issue that requests  are refused randomly . Then we check the code, 
> find that the micro-second part of a struct timeval tv is not initialized, so 
> it could be randomly set negative.Following is our patch to fix the bug:--- 
> daemon.c 2014-05-05 11:43:03.004311322 +0800
> +++ daemon.c 2014-05-05 11:42:57.220306712 +0800
> @@ -581,6 +581,7 @@
>  tv.tv_sec = 0;
>  else
>  tv.tv_sec = timeout - (now - con->last_activity);
> + tv.tv_usec = 0;
>  tvp = &tv;
>  }
>  if ((con->state == MHD_CONNECTION_NORMAL_BODY_UNREADY) ||

Attachment: 0x48426C7E.asc
Description: application/pgp-keys


reply via email to

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