Skip to content

Commit

Permalink
tclaveirole: fixing #2085 with patch from the bugreport
Browse files Browse the repository at this point in the history
git-svn-id: https://gnunet.org/svn/libmicrohttpd@19263 140774ce-b5e7-0310-ab8b-a85725594a96
  • Loading branch information
grothoff committed Jan 19, 2012
1 parent 0219f5d commit 5bd5211
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Thu Jan 19 17:46:05 CET 2012
Fixing use of uninitialized 'earliest_deadline' variable in
MHD_get_timeout which can lead to returning an incorrect
(too early) timeout (#2085). -tclaveirole

Thu Jan 19 13:31:27 CET 2012
Fixing digest authentication for GET requests with URI arguments
(#2059). -CG
Expand Down
5 changes: 3 additions & 2 deletions src/daemon/daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1219,14 +1219,15 @@ MHD_get_timeout (struct MHD_Daemon *daemon,
while (pos != NULL)
{
if (0 != pos->connection_timeout) {
have_timeout = MHD_YES;
if (earliest_deadline > pos->last_activity + pos->connection_timeout)
if (!have_timeout ||
earliest_deadline > pos->last_activity + pos->connection_timeout)
earliest_deadline = pos->last_activity + pos->connection_timeout;
#if HTTPS_SUPPORT
if ( (0 != (daemon->options & MHD_USE_SSL)) &&
(0 != gnutls_record_check_pending (pos->tls_session)) )
earliest_deadline = 0;
#endif
have_timeout = MHD_YES;
}
pos = pos->next;
}
Expand Down

0 comments on commit 5bd5211

Please sign in to comment.