]> The Tcpdump Group git mirrors - tcpdump/commitdiff
correct termination processing for DNS payload decoding (NI6 FQDN).
authoritojun <itojun>
Mon, 15 May 2000 06:22:16 +0000 (06:22 +0000)
committeritojun <itojun>
Mon, 15 May 2000 06:22:16 +0000 (06:22 +0000)
maybe we should just call ns_nprint().

print-icmp6.c

index 07a16b2181117653886d35776c2e479be42d8c40..f2f072dfc30ce85da0fbb5036cb316802fdf9f64 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.10 2000-05-10 09:24:15 itojun Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.11 2000-05-15 06:22:16 itojun Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -690,7 +690,8 @@ icmp6_nodeinfo_print(int icmp6len, const u_char *bp, const u_char *ep)
                                                safeputc(*cp);
                                                cp++;
                                        }
-                                       printf(".");
+                                       if (cp + 1 < ep && *cp)
+                                               printf(".");
                                }
                                printf("\"");
                        }
@@ -788,7 +789,8 @@ icmp6_nodeinfo_print(int icmp6len, const u_char *bp, const u_char *ep)
                                                safeputc(*cp);
                                                cp++;
                                        }
-                                       printf(".");
+                                       if (cp + 1 < ep && *cp)
+                                               printf(".");
                                }
                                printf("\"");
                        }