diff options
Diffstat (limited to 'user/c-ares')
-rw-r--r-- | user/c-ares/APKBUILD | 30 | ||||
-rw-r--r-- | user/c-ares/onion-segfault.patch | 36 |
2 files changed, 14 insertions, 52 deletions
diff --git a/user/c-ares/APKBUILD b/user/c-ares/APKBUILD index 8b9cc81ee..71a799909 100644 --- a/user/c-ares/APKBUILD +++ b/user/c-ares/APKBUILD @@ -1,38 +1,36 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=c-ares -pkgver=1.15.0 +pkgver=1.18.1 pkgrel=1 pkgdesc="Asynchronous DNS/name resolver library" -url="https://c-ares.haxx.se/" +url="https://c-ares.org/" arch="all" options="!checkroot" license="MIT" depends="" -makedepends="" +makedepends="cmake" subpackages="$pkgname-doc $pkgname-dev" -source="https://c-ares.haxx.se/download/$pkgname-$pkgver.tar.gz - onion-segfault.patch - " +source="https://c-ares.org/download/$pkgname-$pkgver.tar.gz" build() { - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --prefix=/usr \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --enable-shared + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=True \ + -DCMAKE_BUILD_TYPE=RelWithDebugInfo \ + -DCARES_BUILD_TESTS=ON \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + . make } check() { - make -C test check + bin/arestest --gtest_filter=-*.Live* } package() { make -j1 DESTDIR="$pkgdir" install } -sha512sums="a1de6c5e7e1a6a13c926aae690e83d5caa51e7313d63da1cf2af6bc757c41d585aad5466bc3ba7b7f7793cb1748fa589f40972b196728851c8b059cfc8c3be50 c-ares-1.15.0.tar.gz -f26d4e981afc87fe734893d91210f1d5cbdf841d7704acf41a964991ab669fffd0ffd661c24be84d67edc9e1d6804214e6e7188e77f6555c01c9ad8165f6fbfa onion-segfault.patch" +sha512sums="1276ec0799916019f8c0af6b55a139701bd15e0ca4a00811d07963893978bc96c107b980f0fd49f81aa70bc8b3b8cd671195ba357c390772d4c2c5643c50c5a5 c-ares-1.18.1.tar.gz" diff --git a/user/c-ares/onion-segfault.patch b/user/c-ares/onion-segfault.patch deleted file mode 100644 index 7e5a712cd..000000000 --- a/user/c-ares/onion-segfault.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 43a915a1b741b7c5bad2f622de90f353cdae7694 Mon Sep 17 00:00:00 2001 -From: Khaidi Chu <i@2333.moe> -Date: Mon, 4 Feb 2019 10:38:07 +0800 -Subject: [PATCH] fix: init bufp before reject .onion to make it can be free - correctly (#241) - -When querying a .onion domain, it returns directly without setting bufp to NULL. A subsequent free() that occurs can cause a segmentation fault. - -Fix By: Khaidi Chu (@XadillaX) ---- - ares_create_query.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/ares_create_query.c b/ares_create_query.c -index 1606b1a1..9efce17c 100644 ---- a/ares_create_query.c -+++ b/ares_create_query.c -@@ -94,14 +94,14 @@ int ares_create_query(const char *name, int dnsclass, int type, - size_t buflen; - unsigned char *buf; - -- /* Per RFC 7686, reject queries for ".onion" domain names with NXDOMAIN. */ -- if (ares__is_onion_domain(name)) -- return ARES_ENOTFOUND; -- - /* Set our results early, in case we bail out early with an error. */ - *buflenp = 0; - *bufp = NULL; - -+ /* Per RFC 7686, reject queries for ".onion" domain names with NXDOMAIN. */ -+ if (ares__is_onion_domain(name)) -+ return ARES_ENOTFOUND; -+ - /* Allocate a memory area for the maximum size this packet might need. +2 - * is for the length byte and zero termination if no dots or ecscaping is - * used. |