diff options
author | Timo Teräs <timo.teras@iki.fi> | 2014-08-01 08:54:39 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2014-08-01 08:57:30 +0300 |
commit | 82db5343f3ea625246e259780e0c85f074d0f058 (patch) | |
tree | 1f3129c8211b783a46c0cc75ee7b533d1ab76d3d /main | |
parent | d2ad90e966b5fff194a6ff207b5504e426515675 (diff) | |
download | aports-82db5343f3ea625246e259780e0c85f074d0f058.tar.bz2 aports-82db5343f3ea625246e259780e0c85f074d0f058.tar.xz |
main/gdnsd: fix bug parsing corrupted djbdns files
Fields are assigned to zero length read-only string literals if
they are not present in the zone data. Avoid writing to read-only
memory in those cases.
Diffstat (limited to 'main')
-rw-r--r-- | main/gdnsd/0003-fix-djbdns-text-parsing.patch | 13 | ||||
-rw-r--r-- | main/gdnsd/APKBUILD | 6 |
2 files changed, 18 insertions, 1 deletions
diff --git a/main/gdnsd/0003-fix-djbdns-text-parsing.patch b/main/gdnsd/0003-fix-djbdns-text-parsing.patch new file mode 100644 index 0000000000..bc0c4e29e0 --- /dev/null +++ b/main/gdnsd/0003-fix-djbdns-text-parsing.patch @@ -0,0 +1,13 @@ +diff -ru gdnsd-1.11.3.orig/gdnsd/zscan_djb.c gdnsd-1.11.3/gdnsd/zscan_djb.c +--- gdnsd-1.11.3.orig/gdnsd/zscan_djb.c 2014-08-01 08:22:55.000000000 -0300 ++++ gdnsd-1.11.3/gdnsd/zscan_djb.c 2014-08-01 08:49:37.338082860 -0300 +@@ -226,6 +226,9 @@ + unsigned int i; + unsigned int j; + ++ if (f->len < 2) ++ return; ++ + j = 0; + i = 0; + while (i < f->len) { diff --git a/main/gdnsd/APKBUILD b/main/gdnsd/APKBUILD index 25df36e91c..a7fafcb504 100644 --- a/main/gdnsd/APKBUILD +++ b/main/gdnsd/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Timo Teräs <timo.teras@iki.fi> pkgname=gdnsd pkgver=1.11.3 -pkgrel=0 +pkgrel=1 pkgdesc="Geographic Authoritative DNS server" url="https://github.com/blblack/gdnsd/" arch="all" @@ -15,6 +15,7 @@ subpackages="$pkgname-dev $pkgname-doc" source="saveas-https://github.com/blblack/gdnsd/archive/v$pkgver.tar.gz/gdnsd-$pkgver.tar.gz 0001-Fix-ztree_txn_-API-to-work.patch 0002-Impelement-loading-of-DJBDNS-zone-files.patch + 0003-fix-djbdns-text-parsing.patch gdnsd.initd" _builddir="$srcdir"/gdnsd-$pkgver @@ -56,12 +57,15 @@ package() { md5sums="c5a96b0a487c9bc5574bdb5be52dca9d gdnsd-1.11.3.tar.gz 64b0232acbd664db83ff2ac800cb5459 0001-Fix-ztree_txn_-API-to-work.patch 87aaa21fb7c4f1b84f27e120db39b722 0002-Impelement-loading-of-DJBDNS-zone-files.patch +311085266e946c6f9057f69e549df46d 0003-fix-djbdns-text-parsing.patch 85f07d47b324a8913cb87a45067d4f44 gdnsd.initd" sha256sums="9c3ad455c4b33bc5897f43ed389b011730edfc17acfc5225a2daa3789303a5a0 gdnsd-1.11.3.tar.gz f42d30f3aa88d5fedcf1642de33132beafade609c041ed9f5943ba3da9d7c2fb 0001-Fix-ztree_txn_-API-to-work.patch 445fc93fdacf8f320b1a3bf21c9458df1426437fae588e4f53ae808a35f719ac 0002-Impelement-loading-of-DJBDNS-zone-files.patch +591e2a8b1e06a47b37255c9bc0b47ada914fd2079f9e3e5cd609e755ec033597 0003-fix-djbdns-text-parsing.patch dd1ee7fa4063455f127c444b467625fd12cc51349858757614607cf367804a74 gdnsd.initd" sha512sums="b61eb9f49b4aa99eb88537f6c0a367e25d8b0f75280f9d9a89458120a9ca0bace27bf206a8d372b02763814879e271db8bfe3027372523cdb1ed9eff739e9730 gdnsd-1.11.3.tar.gz c8a1a23a623dcacf3cd799929a974edbe29e0ab36ef85ada4047dd04726c96ff040eff733509f523b9982aa8956408b9a654f8c6c6c26e454773b3b81d4f49cb 0001-Fix-ztree_txn_-API-to-work.patch 338ccd7ae56cd099d38c63db98a11ae05c2750ce795d2513a04ebbdbb6dda89e123bde0844b52adef5de4ec99ebf7c2ab77f4672b99a3b00398b45df1d601215 0002-Impelement-loading-of-DJBDNS-zone-files.patch +965d5791c883d0ad10bf64ef2b1b67f6ffab87a1cad0be0366f0cf6e26491061481aaa2d00f90c0465250980d227a277e2d2bda20e6b7e4ad94150debed619bf 0003-fix-djbdns-text-parsing.patch 0e8263182bbfa52aa8176443373d5de8b05dfb3f6d4f3268e0deecaca24832125bb3fa59309a4880bd7ae76ffb612ecb61f6cf00732f0237a4de21fadae219b5 gdnsd.initd" |