]> git.ipfire.org Git - people/ms/dnsmasq.git/commitdiff
Nasty, rare and obscure off-by-one in DNSSEC hostname_cmp().
authorSimon Kelley <simon@thekelleys.org.uk>
Sun, 20 Dec 2015 20:50:05 +0000 (20:50 +0000)
committerSimon Kelley <simon@thekelleys.org.uk>
Sun, 20 Dec 2015 20:50:05 +0000 (20:50 +0000)
src/dnssec.c

index e09f3043f4c90ba7725cdc5ee9ee9b873711ef02..29848e1bd6ca7bdda4a5a8f6708b9e826882c73e 100644 (file)
@@ -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;
     }
 }