diff options
author | anders <anders@FreeBSD.org> | 2003-10-29 05:58:59 +0800 |
---|---|---|
committer | anders <anders@FreeBSD.org> | 2003-10-29 05:58:59 +0800 |
commit | 19c73b4bd7c4c6d7ec15e619d1999eefcfdec283 (patch) | |
tree | 46dcd2e9685853aee84569769c9385a9c0904c9d /www/thttpd/files | |
parent | 3e4c2e1bcbd85ef10c23c963070a7679a9dcf841 (diff) | |
download | freebsd-ports-graphics-19c73b4bd7c4c6d7ec15e619d1999eefcfdec283.tar.gz freebsd-ports-graphics-19c73b4bd7c4c6d7ec15e619d1999eefcfdec283.tar.zst freebsd-ports-graphics-19c73b4bd7c4c6d7ec15e619d1999eefcfdec283.zip |
Update to 2.24.
Older versions of thttpd has a remote overflow.
Security advisory: http://www.texonet.com/advisories/TEXONET-20030908.txt
PR: 58648
Diffstat (limited to 'www/thttpd/files')
-rw-r--r-- | www/thttpd/files/patch-thttpd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/www/thttpd/files/patch-thttpd.c b/www/thttpd/files/patch-thttpd.c index c538dce4b73..fde13bd8bbe 100644 --- a/www/thttpd/files/patch-thttpd.c +++ b/www/thttpd/files/patch-thttpd.c @@ -1,6 +1,6 @@ ---- thttpd.c.orig Sat May 25 19:43:13 2002 -+++ thttpd.c Sun Oct 20 23:58:44 2002 -@@ -1500,12 +1500,45 @@ +--- thttpd.c.orig Tue May 13 17:14:33 2003 ++++ thttpd.c Wed Oct 29 05:50:14 2003 +@@ -1593,12 +1593,45 @@ if ( hc->responselen == 0 ) { /* No, just write the file. */ @@ -9,7 +9,7 @@ + + sz = sendfile( + hc->file_fd, hc->conn_fd, c->bytes_sent, -+ MIN( c->bytes_to_send - c->bytes_sent, c->limit ), ++ MIN( c->bytes_to_send - c->bytes_sent, c->max_limit ), + NULL, &sbytes, 0 ); + if (sz == -1 && errno == EAGAIN) + sz = sbytes > 0 ? sbytes : -1; @@ -18,7 +18,7 @@ +#else sz = write( hc->conn_fd, &(hc->file_address[c->bytes_sent]), - MIN( c->bytes_to_send - c->bytes_sent, c->limit ) ); + MIN( c->bytes_to_send - c->bytes_sent, c->max_limit ) ); +#endif } else @@ -36,7 +36,7 @@ + sf.trl_cnt = 0; + sz = sendfile( + hc->file_fd, hc->conn_fd, c->bytes_sent, -+ MIN( c->bytes_to_send - c->bytes_sent, c->limit ), ++ MIN( c->bytes_to_send - c->bytes_sent, c->max_limit ), + &sf, &sbytes, 0 ); + if (sz == -1 && errno == EAGAIN) + sz = sbytes > 0 ? sbytes : -1; @@ -46,9 +46,9 @@ /* Yes. We'll combine headers and file into a single writev(), ** hoping that this generates a single packet. */ -@@ -1516,6 +1549,7 @@ +@@ -1609,6 +1642,7 @@ iv[1].iov_base = &(hc->file_address[c->bytes_sent]); - iv[1].iov_len = MIN( c->bytes_to_send - c->bytes_sent, c->limit ); + iv[1].iov_len = MIN( c->bytes_to_send - c->bytes_sent, c->max_limit ); sz = writev( hc->conn_fd, iv, 2 ); +#endif } |