]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
address len being shadowed
authorMark Andrews <marka@isc.org>
Tue, 11 Aug 2015 02:59:34 +0000 (12:59 +1000)
committerMark Andrews <marka@isc.org>
Tue, 11 Aug 2015 03:00:29 +0000 (13:00 +1000)
(cherry picked from commit f260e3a188c6ecc96d2ef4d44dec0fb32ffc5378)

bin/tests/wire_test.c

index 7362c6f3ffde6272a230d2dbe62b9b1f70e3eb0e..a5c9006d8106ff4452e780016d5b1ab68be27abb 100644 (file)
@@ -177,22 +177,22 @@ main(int argc, char *argv[]) {
        if (tcp) {
                unsigned char *p = b;
                while (p < bp) {
-                       unsigned int len;
+                       unsigned int tcplen;
 
                        if (p + 2 > bp) {
                                fprintf(stderr, "premature end of packet\n");
                                exit(1);
                        }
-                       len = p[0] << 8 | p[1];
+                       tcplen = p[0] << 8 | p[1];
 
-                       if (p + 2 + len > bp) {
+                       if (p + 2 + tcplen > bp) {
                                fprintf(stderr, "premature end of packet\n");
                                exit(1);
                        }
-                       isc_buffer_init(&source, p + 2, len);
-                       isc_buffer_add(&source, len);
+                       isc_buffer_init(&source, p + 2, tcplen);
+                       isc_buffer_add(&source, tcplen);
                        process_message(&source);
-                       p += 2 + len;
+                       p += 2 + tcplen;
                }
        } else {
                isc_buffer_init(&source, b, sizeof(b));