[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r14633 - in libmicrohttpd: . src/daemon
From: |
gnunet |
Subject: |
[GNUnet-SVN] r14633 - in libmicrohttpd: . src/daemon |
Date: |
Fri, 11 Mar 2011 22:30:25 +0100 |
Author: grothoff
Date: 2011-03-11 22:30:24 +0100 (Fri, 11 Mar 2011)
New Revision: 14633
Modified:
libmicrohttpd/AUTHORS
libmicrohttpd/ChangeLog
libmicrohttpd/src/daemon/daemon.c
Log:
libmicrohttpd] bug in MHD_create_response_from_fd_at_offset()
From:
Eivind Sarto <address@hidden>
To:
"address@hidden" <address@hidden>
Date:
Today 09:32:21 pm
Spam Status: Spamassassin 0% probability of being spam.
Full report:
Probability=No, score=-2.6 required=7.0 tests=BAYES_00 autolearn=ham
version=3.2.5-tuminfo_1
There appears to be a bug in MHD_create_response_from_fd_at_offset().
Calling this function with anything other than a zero offset will cause wrong
data
or no data (sendfile fails if length < 0).
If you use this call with any application that uses ranges, this bug will
trigger.
In src/daemon/daemon.c: send_param_adapter()
.....
/* can use sendfile */
offset = (off_t) connection->response_write_position +
connection->response->fd_off;
#ifdef BUGFIX
/* correct */
left = connection->response->total_size -
connection->response_write_position;
#else
left = connection->response->total_size - offset;
#endif
if (left > SSIZE_MAX)
left = SSIZE_MAX; /* cap at return value limit */
ret = sendfile (connection->socket_fd,
fd,
&offset,
left);
-eivind
Modified: libmicrohttpd/AUTHORS
===================================================================
--- libmicrohttpd/AUTHORS 2011-03-11 17:03:44 UTC (rev 14632)
+++ libmicrohttpd/AUTHORS 2011-03-11 21:30:24 UTC (rev 14633)
@@ -29,6 +29,7 @@
Gerrit Telkamp <address@hidden>
Erik Slagter <address@hidden>
Andreas Wehrmann <address@hidden>
+Eivind Sarto <address@hidden>
Documentation contributions also came from:
Marco Maggi <address@hidden>
Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog 2011-03-11 17:03:44 UTC (rev 14632)
+++ libmicrohttpd/ChangeLog 2011-03-11 21:30:24 UTC (rev 14633)
@@ -1,3 +1,6 @@
+Fri Mar 11 22:25:29 CET 2011
+ Fixing bug in MHD_create_response_from_fd_at_offset with non-zero
offsets. -ES
+
Sat Mar 5 22:00:36 CET 2011
Do not use POLLRDHUP, which causes build errors on OS X / OpenSolaris
(#1667). -CG
Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c 2011-03-11 17:03:44 UTC (rev 14632)
+++ libmicrohttpd/src/daemon/daemon.c 2011-03-11 21:30:24 UTC (rev 14633)
@@ -746,7 +746,7 @@
{
/* can use sendfile */
offset = (off_t) connection->response_write_position +
connection->response->fd_off;
- left = connection->response->total_size - offset;
+ left = connection->response->total_size -
connection->response_write_position;
if (left > SSIZE_MAX)
left = SSIZE_MAX; /* cap at return value limit */
ret = sendfile (connection->socket_fd,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r14633 - in libmicrohttpd: . src/daemon,
gnunet <=