On Sun, 2011-10-30 at 18:36 +0100, Gregor Jasny wrote:
How should I go on here? I see three options:
1) Update stable version with the single patch from the bug report
This would be the safest and generally preferred option.
$ debdiff --diffstat c-ares_1.7.3-1.dsc c-ares_1.7.3-1squeeze1.dsc
diffstat for c-ares-1.7.3 c-ares-1.7.3
changelog | 6 ++++++
gbp.conf | 2 +-
patches/fix_ares_expand_name.diff | 26 ++++++++++++++++++++++++++
patches/series | 1 +
4 files changed, 34 insertions(+), 1 deletion(-)
diff -Nru c-ares-1.7.3/debian/changelog c-ares-1.7.3/debian/changelog
--- c-ares-1.7.3/debian/changelog 2010-06-13 22:01:50.000000000 +0200
+++ c-ares-1.7.3/debian/changelog 2011-11-04 15:45:58.000000000 +0100
@@ -1,3 +1,9 @@
+c-ares (1.7.3-1squeeze1) stable; urgency=low
+
+ * Fix ares_expand_name bug (Closes: #607438)
+
+ -- Gregor Jasny <gjasny@googlemail.com> Fri, 04 Nov 2011 15:33:10 +0100
+
c-ares (1.7.3-1) unstable; urgency=low
[ Gregor Jasny ]
diff -Nru c-ares-1.7.3/debian/gbp.conf c-ares-1.7.3/debian/gbp.conf
--- c-ares-1.7.3/debian/gbp.conf 2010-06-13 22:01:50.000000000 +0200
+++ c-ares-1.7.3/debian/gbp.conf 2011-11-04 14:59:24.000000000 +0100
@@ -1,6 +1,6 @@
[DEFAULT]
upstream-branch = upstream
-debian-branch = master
+debian-branch = squeeze
upstream-tag = upstream/%(version)s
debian-tag = debian/%(version)s
pristine-tar = True
diff -Nru c-ares-1.7.3/debian/patches/fix_ares_expand_name.diff c-ares-1.7.3/debian/patches/fix_ares_expand_name.diff
--- c-ares-1.7.3/debian/patches/fix_ares_expand_name.diff 1970-01-01 01:00:00.000000000 +0100
+++ c-ares-1.7.3/debian/patches/fix_ares_expand_name.diff 2011-11-04 15:44:26.000000000 +0100
@@ -0,0 +1,26 @@
+Origin: upstream, 70b726c3343f83d7d3460dce0b24e8930c6f6195
+Author: Stefan Bühler <stbuehler@web.de>
+Date: Sat Dec 18 14:17:09 2010 +0100
+
+ ares_expand_name: Fix encoded length for indirect root
+
+diff --git a/ares_expand_name.c b/ares_expand_name.c
+index 2af6b2a..e3eccd2 100644
+--- a/ares_expand_name.c
++++ b/ares_expand_name.c
+@@ -87,7 +87,14 @@ int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf,
+ * Since this function strips trailing dots though, it becomes ""
+ */
+ q[0] = '\0';
+- *enclen = 1; /* the caller should move one byte to get past this */
++
++ /* indirect root label (like 0xc0 0x0c) is 2 bytes long (stupid, but
++ valid) */
++ if ((*encoded & INDIR_MASK) == INDIR_MASK)
++ *enclen = 2;
++ else
++ *enclen = 1; /* the caller should move one byte to get past this */
++
+ return ARES_SUCCESS;
+ }
+
diff -Nru c-ares-1.7.3/debian/patches/series c-ares-1.7.3/debian/patches/series
--- c-ares-1.7.3/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
+++ c-ares-1.7.3/debian/patches/series 2011-11-04 15:44:26.000000000 +0100
@@ -0,0 +1 @@
+fix_ares_expand_name.diff