pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/libevent libevent: Fix issue #509
details: https://anonhg.NetBSD.org/pkgsrc/rev/2b2a2e7feb23
branches: trunk
changeset: 369121:2b2a2e7feb23
user: gson <gson%pkgsrc.org@localhost>
date: Tue Sep 26 17:57:36 2017 +0000
description:
libevent: Fix issue #509
Do not crash when evhttp_send_reply_start() is called after
a timeout. See https://github.com/libevent/libevent/issues/509.
diffstat:
devel/libevent/Makefile | 7 ++++++-
devel/libevent/distinfo | 3 ++-
devel/libevent/patches/patch-http.c | 18 ++++++++++++++++++
3 files changed, 26 insertions(+), 2 deletions(-)
diffs (62 lines):
diff -r af9665c2f0f0 -r 2b2a2e7feb23 devel/libevent/Makefile
--- a/devel/libevent/Makefile Tue Sep 26 17:54:13 2017 +0000
+++ b/devel/libevent/Makefile Tue Sep 26 17:57:36 2017 +0000
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile,v 1.52 2017/09/22 02:58:50 maya Exp $
+# $NetBSD: Makefile,v 1.53 2017/09/26 17:57:36 gson Exp $
.include "../../devel/libevent/Makefile.common"
+PKGREVISION= 1
+
PKGNAME= ${DISTNAME:S/-stable//}
COMMENT= Asynchronous event notification library
@@ -20,6 +22,9 @@
CPPFLAGS.SunOS+= -D__EXTENSIONS__
CPPFLAGS.QNX+= -D__EXT_POSIX2
+CFLAGS+=-g -O0
+INSTALL_UNSTRIPPED=yes
+
# XXX helps build, but needs more testing
#CFLAGS.Interix+= -Dsockaddr_storage=sockaddr_in -DNI_MAXSERV=32
diff -r af9665c2f0f0 -r 2b2a2e7feb23 devel/libevent/distinfo
--- a/devel/libevent/distinfo Tue Sep 26 17:54:13 2017 +0000
+++ b/devel/libevent/distinfo Tue Sep 26 17:57:36 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.36 2017/09/23 03:24:55 maya Exp $
+$NetBSD: distinfo,v 1.37 2017/09/26 17:57:36 gson Exp $
SHA1 (libevent-2.1.8-stable.tar.gz) = 2a1b8bb7a262d3fd0ed6a080a20991a6eed675ec
RMD160 (libevent-2.1.8-stable.tar.gz) = 6c7ce8cb51279f9b6b8d8897192db6a2da3d6797
@@ -6,5 +6,6 @@
Size (libevent-2.1.8-stable.tar.gz) = 1026485 bytes
SHA1 (patch-Makefile.in) = 09c7524eb8657e1f76232db97273806a8c900219
SHA1 (patch-evutil__rand.c) = 2b51e719d25181e03b5afb7df0bf443f1d62a8f1
+SHA1 (patch-http.c) = f878714bf4d894d0026580bbed2a93927543eae8
SHA1 (patch-signal.c) = 1058566e7a6e0ffb709fbd2a3440cac86e188657
SHA1 (patch-test_bench__cascade.c) = 58bd32fe0cddc468fda57386283b5298b28ef93e
diff -r af9665c2f0f0 -r 2b2a2e7feb23 devel/libevent/patches/patch-http.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libevent/patches/patch-http.c Tue Sep 26 17:57:36 2017 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-http.c,v 1.1 2017/09/26 17:57:36 gson Exp $
+
+Do not crash when evhttp_send_reply_start() is called after
+a timeout. Fixes https://github.com/libevent/libevent/issues/509.
+
+--- http.c.orig 2016-12-18 21:56:34.000000000 +0000
++++ http.c
+@@ -2820,6 +2820,10 @@ evhttp_send_reply_start(struct evhttp_re
+ const char *reason)
+ {
+ evhttp_response_code_(req, code, reason);
++
++ if (req->evcon == NULL)
++ return;
++
+ if (evhttp_find_header(req->output_headers, "Content-Length") == NULL &&
+ REQ_VERSION_ATLEAST(req, 1, 1) &&
+ evhttp_response_needs_body(req)) {
Home |
Main Index |
Thread Index |
Old Index