diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-08-13 11:19:06 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-08-13 11:21:26 +0000 |
commit | 024e22b0cd35b94ed6daa0d8a9bfb9e7e356a4fc (patch) | |
tree | da5454cf98d1d66ec84519a17d9982e1fd1760c0 | |
parent | 318308ffa6409539cb17100a132b8b6ca3b67c1b (diff) | |
download | aports-024e22b0cd35b94ed6daa0d8a9bfb9e7e356a4fc.tar.bz2 aports-024e22b0cd35b94ed6daa0d8a9bfb9e7e356a4fc.tar.xz |
main/musl: fix handling of zero length names in dn_expand()
should fix issue with ENUM in kamailio
sent upstream:
http://www.openwall.com/lists/musl/2014/08/13/6
-rw-r--r-- | main/musl/0001-fix-handling-of-zero-length-domain-names-in-dn_expan.patch | 29 | ||||
-rw-r--r-- | main/musl/APKBUILD | 6 |
2 files changed, 34 insertions, 1 deletions
diff --git a/main/musl/0001-fix-handling-of-zero-length-domain-names-in-dn_expan.patch b/main/musl/0001-fix-handling-of-zero-length-domain-names-in-dn_expan.patch new file mode 100644 index 0000000000..266b976c16 --- /dev/null +++ b/main/musl/0001-fix-handling-of-zero-length-domain-names-in-dn_expan.patch @@ -0,0 +1,29 @@ +From ea35594b2a54c1652bb8ffb04183180ad7325779 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Wed, 13 Aug 2014 08:41:38 +0200 +Subject: [PATCH] fix handling of zero length domain names in dn_expand + +Copy a zero length string instead of returning error when trying to +expand a zero lentgh domain name (null terminator). + +This fixes a regression introduced with 56b57f37a46dab432. +--- + src/network/dn_expand.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/network/dn_expand.c b/src/network/dn_expand.c +index 849df19..3264faf 100644 +--- a/src/network/dn_expand.c ++++ b/src/network/dn_expand.c +@@ -6,7 +6,7 @@ int __dn_expand(const unsigned char *base, const unsigned char *end, const unsig + const unsigned char *p = src; + char *dend = dest + (space > 254 ? 254 : space); + int len = -1, i, j; +- if (p==end || !*p) return -1; ++ if (p==end) return -1; + /* detect reference loop using an iteration counter */ + for (i=0; i < end-base; i+=2) { + if (*p & 0xc0) { +-- +2.0.4 + diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD index b05a543ffb..53358d4651 100644 --- a/main/musl/APKBUILD +++ b/main/musl/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Timo Teräs <timo.teras@iki.fi> pkgname=musl pkgver=1.1.4 -pkgrel=1 +pkgrel=2 pkgdesc="the musl c library (libc) implementation" url="http://www.musl-libc.org/" arch="all" @@ -15,6 +15,7 @@ subpackages="$pkgname-dev $pkgname-utils $pkgname-dbg" source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz 1001-add-basic-dns-record-parsing-functions.patch 1003-remove-ulimit-fiddling-from-setxid.patch + 0001-fix-handling-of-zero-length-domain-names-in-dn_expan.patch ldconfig getopt_long.c @@ -120,6 +121,7 @@ utils() { md5sums="f18f3bdbe088438cd64a5313c19a7312 musl-1.1.4.tar.gz 2371eb1ce057fcb709a0e6a81f0d356c 1001-add-basic-dns-record-parsing-functions.patch 71b2a4dcc39c436a6b89173943424043 1003-remove-ulimit-fiddling-from-setxid.patch +4b0771addf78eb0c4f0210792c99335a 0001-fix-handling-of-zero-length-domain-names-in-dn_expan.patch 830d01f7821b978df770b06db3790921 ldconfig 61c6c1e84ed1df82abbe6d75e90cf21c getopt_long.c 0df687757221bbb0fc1aa67f1bd646f9 __stack_chk_fail_local.c @@ -129,6 +131,7 @@ md5sums="f18f3bdbe088438cd64a5313c19a7312 musl-1.1.4.tar.gz sha256sums="658c65ad3c3a9b281a96c5281e75720c758d91fcaae35ab987f2fdfb4f88f5cd musl-1.1.4.tar.gz 75053a31f6b84a64846d92c0ec631c76d7f747a9c0dc92a6dc1aa1bddfe2ea76 1001-add-basic-dns-record-parsing-functions.patch fb542c2bd5081ff2f601c519edb3dac8f54ca5c888f44bc6cfb84e6565472025 1003-remove-ulimit-fiddling-from-setxid.patch +65129391cbc63cda4387f6dae13cc91b346cf5d9a936494dbc4d4a7687af49a0 0001-fix-handling-of-zero-length-domain-names-in-dn_expan.patch b4a2c06db38742e8c42c3c9838b285a7d8cdac6c091ff3df5ff9a15f1e41b9c7 ldconfig d9b644ec20bc33e81a7c52b9fcf7973d835923a69faf50f03db45534b811bd96 getopt_long.c 299a7d75a09de3e2e11e7fb4acc3182e4a14e868093d2f30938fce9bfcff13da __stack_chk_fail_local.c @@ -138,6 +141,7 @@ f79a2930a2e5bb0624321589edf8b889d1e9b603e01e6b7ae214616605b3fdd7 iconv.c" sha512sums="a46fb1db23f518beaa959e9bebcb3bf0574e583c197792d30dcd52b3974e3c285594984207043d317859fc5552f1d303a5686e9fbe3b8825df6346de7f917f9f musl-1.1.4.tar.gz 5b8ffa0a50419581adbf6ce2dae5797774022551c6331fa5aa2ff13635eb72b74eedd8a92cb478d45d73e1956af2f588669681ac414f3a255abd4d8ba8579448 1001-add-basic-dns-record-parsing-functions.patch dae010b45419fcab64410568466f659cdc874e63113025e2cbc2fbab047b470fec23851ecbef08886505924482a069caf37c16b483b6922535fbd31832f1c4a3 1003-remove-ulimit-fiddling-from-setxid.patch +3ffe3eb575ddc0f17abb952a1effd1545fd8d81c019b2f700f74d811f5c076ae20c332df755866c74dfffa9909e7900e667d3d73992d0ca85279056ce623fee3 0001-fix-handling-of-zero-length-domain-names-in-dn_expan.patch 8d3a2d5315fc56fee7da9abb8b89bb38c6046c33d154c10d168fb35bfde6b0cf9f13042a3bceee34daf091bc409d699223735dcf19f382eeee1f6be34154f26f ldconfig 140f3f20d30bd95ebce8c41b8cc7f616c6cbedf4ea06c729c21014e74f6043796825cc40ebc5180620ea38173afdba23f09ebf6d8b11fa05440b14d23764fca9 getopt_long.c 062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c |