From: Simon Kelley Date: Sun, 20 Dec 2015 20:50:05 +0000 (+0000) Subject: Nasty, rare and obscure off-by-one in DNSSEC hostname_cmp(). X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3e86d316c4bb406ed813aa5256615c8a95cac6d8;p=people%2Fms%2Fdnsmasq.git Nasty, rare and obscure off-by-one in DNSSEC hostname_cmp(). --- diff --git a/src/dnssec.c b/src/dnssec.c index e09f304..29848e1 100644 --- a/src/dnssec.c +++ b/src/dnssec.c @@ -1394,8 +1394,8 @@ static int hostname_cmp(const char *a, const char *b) if (sb == b) return 1; - ea = sa--; - eb = sb--; + ea = --sa; + eb = --sb; } }