libevent: update to 2.1.8 (soname bump)

This commit is contained in:
Alessio Sergi 2017-02-27 13:21:24 +01:00 committed by Duncaen
parent 8bca2012b0
commit a98160d256
7 changed files with 95 additions and 78 deletions

View File

@ -650,9 +650,9 @@ libsasl2.so.3 libsasl-2.1.26_1
liblber-2.4.so.2 libldap-2.4.21_1 liblber-2.4.so.2 libldap-2.4.21_1
libldap-2.4.so.2 libldap-2.4.21_1 libldap-2.4.so.2 libldap-2.4.21_1
libldap_r-2.4.so.2 libldap-2.4.21_1 libldap_r-2.4.so.2 libldap-2.4.21_1
libevent-2.0.so.5 libevent-2.0.10_1 libevent-2.1.so.6 libevent-2.1.8_1
libevent_core-2.0.so.5 libevent-2.0.21_1 libevent_core-2.1.so.6 libevent-2.1.8_1
libevent_pthreads-2.0.so.5 libevent-2.0.21_1 libevent_pthreads-2.1.so.6 libevent-2.1.8_1
libSDL_mixer-1.2.so.0 SDL_mixer-1.2.11_1 libSDL_mixer-1.2.so.0 SDL_mixer-1.2.11_1
libapr-1.so.0 apr-1.4.2_1 libapr-1.so.0 apr-1.4.2_1
libaprutil-1.so.0 apr-util-1.3.9_1 libaprutil-1.so.0 apr-util-1.3.9_1

View File

@ -1,23 +0,0 @@
From 96f64a022014a208105ead6c8a7066018449d86d Mon Sep 17 00:00:00 2001
From: Azat Khuzhin <a3at.mail@gmail.com>
Date: Mon, 1 Feb 2016 17:32:09 +0300
Subject: [PATCH] evdns: name_parse(): fix remote stack overread
--- evdns.c
+++ evdns.c
@@ -976,7 +976,6 @@ name_parse(u8 *packet, int length, int *idx, char *name_out, int name_out_len) {
for (;;) {
u8 label_len;
- if (j >= length) return -1;
GET8(label_len);
if (!label_len) break;
if (label_len & 0xc0) {
@@ -997,6 +996,7 @@ name_parse(u8 *packet, int length, int *idx, char *name_out, int name_out_len) {
*cp++ = '.';
}
if (cp + label_len >= end) return -1;
+ if (j + label_len > length) return -1;
memcpy(cp, packet + j, label_len);
cp += label_len;
j += label_len;

View File

@ -1,23 +0,0 @@
From 329acc18a0768c21ba22522f01a5c7f46cacc4d5 Mon Sep 17 00:00:00 2001
From: Azat Khuzhin <a3at.mail@gmail.com>
Date: Sun, 31 Jan 2016 00:57:16 +0300
Subject: [PATCH] evutil_parse_sockaddr_port(): fix buffer overflow
--- evutil.c
+++ evutil.c
@@ -2058,12 +2058,12 @@ evutil_parse_sockaddr_port(const char *ip_as_string, struct sockaddr *out, int *
cp = strchr(ip_as_string, ':');
if (*ip_as_string == '[') {
- int len;
+ size_t len;
if (!(cp = strchr(ip_as_string, ']'))) {
return -1;
}
- len = (int) ( cp-(ip_as_string + 1) );
- if (len > (int)sizeof(buf)-1) {
+ len = ( cp-(ip_as_string + 1) );
+ if (len > sizeof(buf)-1) {
return -1;
}
memcpy(buf, ip_as_string+1, len);

View File

@ -1,21 +0,0 @@
From ec65c42052d95d2c23d1d837136d1cf1d9ecef9e Mon Sep 17 00:00:00 2001
From: Azat Khuzhin <a3at.mail@gmail.com>
Date: Fri, 25 Mar 2016 00:33:47 +0300
Subject: [PATCH] evdns: fix searching empty hostnames
--- evdns.c
+++ evdns.c
@@ -3175,9 +3175,12 @@ search_set_from_hostname(struct evdns_base *base) {
static char *
search_make_new(const struct search_state *const state, int n, const char *const base_name) {
const size_t base_len = strlen(base_name);
- const char need_to_append_dot = base_name[base_len - 1] == '.' ? 0 : 1;
+ char need_to_append_dot;
struct search_domain *dom;
+ if (!base_len) return NULL;
+ need_to_append_dot = base_name[base_len - 1] == '.' ? 0 : 1;
+
for (dom = state->head; dom; dom = dom->next) {
if (!n--) {
/* this is the postfix we want */

View File

@ -0,0 +1,81 @@
--- openssl-compat.h.orig
+++ openssl-compat.h
@@ -1,7 +1,7 @@
#ifndef OPENSSL_COMPAT_H
#define OPENSSL_COMPAT_H
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
{
@@ -30,6 +30,6 @@ static inline BIO_METHOD *BIO_meth_new(i
#define TLS_method SSLv23_method
-#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
+#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) */
#endif /* OPENSSL_COMPAT_H */
--- sample/https-client.c.orig
+++ sample/https-client.c
@@ -312,7 +312,7 @@ main(int argc, char **argv)
}
uri[sizeof(uri) - 1] = '\0';
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
// Initialize OpenSSL
SSL_library_init();
ERR_load_crypto_strings();
@@ -480,7 +480,7 @@ cleanup:
SSL_CTX_free(ssl_ctx);
if (type == HTTP && ssl)
SSL_free(ssl);
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
EVP_cleanup();
ERR_free_strings();
@@ -492,7 +492,7 @@ cleanup:
CRYPTO_cleanup_all_ex_data();
sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
-#endif /*OPENSSL_VERSION_NUMBER < 0x10100000L */
+#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) */
#ifdef _WIN32
WSACleanup();
--- sample/le-proxy.c.orig
+++ sample/le-proxy.c
@@ -259,7 +259,7 @@ main(int argc, char **argv)
if (use_ssl) {
int r;
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
SSL_library_init();
ERR_load_crypto_strings();
SSL_load_error_strings();
--- sample/openssl_hostname_validation.c.orig
+++ sample/openssl_hostname_validation.c
@@ -48,7 +48,7 @@ SOFTWARE.
#define HOSTNAME_MAX_SIZE 255
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
#define ASN1_STRING_get0_data ASN1_STRING_data
#endif
--- test/regress_ssl.c.orig
+++ test/regress_ssl.c
@@ -186,7 +186,7 @@ get_ssl_ctx(void)
void
init_ssl(void)
{
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
SSL_library_init();
ERR_load_crypto_strings();
SSL_load_error_strings();

View File

@ -1,16 +1,20 @@
# Template file for 'libevent' # Template file for 'libevent'
pkgname=libevent pkgname=libevent
version=2.0.22 version=2.1.8
revision=8 revision=1
wrksrc="$pkgname-$version-stable" wrksrc="${pkgname}-${version}-stable"
build_style=gnu-configure build_style=gnu-configure
makedepends="libressl-devel" makedepends="libressl-devel"
short_desc="Abstract asynchronous event notification library" short_desc="Abstract asynchronous event notification library"
maintainer="Juan RP <xtraeme@voidlinux.eu>" maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://www.monkey.org/~provos/libevent/" homepage="http://libevent.org/"
license="GPL-2" license="3-clause-BSD"
distfiles="${SOURCEFORGE_SITE}/levent/$pkgname-$version-stable.tar.gz" distfiles="https://github.com/libevent/libevent/releases/download/release-${version}-stable/libevent-${version}-stable.tar.gz"
checksum=71c2c49f0adadacfdbe6332a372c38cf9c8b7895bb73dabeaa53cdcc1d4e1fa3 checksum=965cc5a8bb46ce4199a47e9b2c9e1cae3b137e8356ffdad6d94d3b9069b71dc2
post_install() {
vlicense LICENSE
}
libevent-devel_package() { libevent-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}" depends="${makedepends} ${sourcepkg}>=${version}_${revision}"

View File

@ -1 +0,0 @@
ignore="*beta*"