chiark / gitweb /
+ * Fix incorrect `compressed datagram contains loop' error.
authorian <ian>
Sat, 16 Sep 2000 18:03:37 +0000 (18:03 +0000)
committerian <ian>
Sat, 16 Sep 2000 18:03:37 +0000 (18:03 +0000)
@@ -1,6 +1,7 @@
   Bugfixes:
+  * Fix incorrect `compressed datagram contains loop' error.

changelog
src/parse.c

index 60b0c43..93c5634 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,6 +1,7 @@
 adns (0.10) unstable; urgency=low
 
   Bugfixes:
+  * Fix incorrect `compressed datagram contains loop' error.
   * Actually compile shared libraries by default !
 
   General Improvements:
index b643e89..12200ac 100644 (file)
@@ -69,10 +69,9 @@ void adns__findlabel_start(findlabel_state *fls, adns_state ads,
 
 adns_status adns__findlabel_next(findlabel_state *fls,
                                 int *lablen_r, int *labstart_r) {
-  int lablen, jumped, jumpto;
+  int lablen, jumpto;
   const char *dgram;
 
-  jumped= 0;
   dgram= fls->dgram;
   for (;;) {
     if (fls->cbyte >= fls->dglen) goto x_truncated;
@@ -80,10 +79,6 @@ adns_status adns__findlabel_next(findlabel_state *fls,
     GET_B(fls->cbyte,lablen);
     if (!(lablen & 0x0c0)) break;
     if ((lablen & 0x0c0) != 0x0c0) return adns_s_unknownformat;
-    if (jumped++) {
-      adns__diag(fls->ads,fls->serv,fls->qu,"compressed datagram contains loop");
-      return adns_s_invalidresponse;
-    }
     if (fls->cbyte >= fls->dglen) goto x_truncated;
     if (fls->cbyte >= fls->max) goto x_badresponse;
     GET_B(fls->cbyte,jumpto);
@@ -104,7 +99,6 @@ adns_status adns__findlabel_next(findlabel_state *fls,
     if (fls->dmend_r) *(fls->dmend_r)= fls->cbyte;
   }
   *lablen_r= lablen;
-/*if (labstart_r) fprintf(stderr,"label %d >%.*s<\n",lablen,lablen,fls->dgram+*labstart_r);*/
   return adns_s_ok;
 
  x_truncated: