]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
do the right thing
authorMiek Gieben <miekg@NLnetLabs.nl>
Mon, 24 Jan 2005 13:31:20 +0000 (13:31 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Mon, 24 Jan 2005 13:31:20 +0000 (13:31 +0000)
str2host.c

index d170b389d36e8a39a0ff2471da8ac77cdf1e6178..b9e45a16a33c04e412f6c2595c57a1aa54f9f00e 100644 (file)
@@ -141,6 +141,7 @@ ldns_str2rdf_int8(ldns_rdf **rd, const uint8_t *bytestr)
  *
  * \todo make this more efficient...
  * we do 3 memcpy's in total...
+ * label_chars2 is used for debugging. TODO: remove
  */
 ldns_status
 ldns_str2rdf_dname(ldns_rdf **rd, const uint8_t* str)
@@ -178,7 +179,7 @@ ldns_str2rdf_dname(ldns_rdf **rd, const uint8_t* str)
                        label_chars2 = label_chars + 39; /* somehting printable */
                        /* put this number in the right spot in buf and
                         * copy those chars over*/
-                       memcpy(q, &label_chars2, 1); 
+                       memcpy(q, &label_chars, 1); 
                        memcpy(q + 1, p, label_chars); 
                        q += (label_chars + 1);
                        p = s + 1; /* move the new position after the dot */
@@ -187,7 +188,7 @@ ldns_str2rdf_dname(ldns_rdf **rd, const uint8_t* str)
        label_chars = s - p; 
        label_chars2 = label_chars + 39; /* somehting printable */
        
-       memcpy(q, &label_chars2, 1); 
+       memcpy(q, &label_chars, 1); 
        memcpy(q + 1, p, label_chars); 
        q += (label_chars + 1);
        *q = '\00'; /* end the string */