libmicrohttpd
[Top][All Lists]
Advanced

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

[libmicrohttpd] Find a bug in libmicrohttpd-0.9.9 a nd provide the fix


From: 钱在晨
Subject: [libmicrohttpd] Find a bug in libmicrohttpd-0.9.9 a nd provide the fix
Date: Mon, 05 May 2014 11:56:20 +0800

Dear Sir/Madam

When 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) ||

Thanks
erbai
------------------------------------------------------------------
发件人:libmicrohttpd-confirm+0e5368a6295b356e00e045f54d0d62ce7b5e8397 <address@hidden>
发送时间:2014年5月5日(星期一) 11:39
收件人:钱在晨(二败) <address@hidden>
主 题:Your confirmation is required to join the libmicrohttpd mailing list

Mailing list subscription confirmation notice for mailing list
libmicrohttpd

We have received a request from 115.236.14.174 for subscription of
your email address, "address@hidden", to the
address@hidden mailing list. To confirm that you want to be
added to this mailing list, simply reply to this message, keeping the
Subject: header intact. Or visit this web page:

https://lists.gnu.org/mailman/confirm/libmicrohttpd/0e5368a6295b356e00e045f54d0d62ce7b5e8397


Or include the following line -- and only the following line -- in a
message to address@hidden:

confirm 0e5368a6295b356e00e045f54d0d62ce7b5e8397

Note that simply sending a `reply' to this message should work from
most mail readers, since that usually leaves the Subject: line in the
right form (additional "Re:" text in the Subject: is okay).

If you do not wish to be subscribed to this list, please simply
disregard this message. If you think you are being maliciously
subscribed to the list, or have any other questions, send them to
address@hidden

reply via email to

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