]> The Tcpdump Group git mirrors - tcpdump/commitdiff
(ip6_print): fix flipped arguments to memcpy. From Rafal Maszkowski
authorassar <assar>
Sat, 29 Jul 2000 07:53:28 +0000 (07:53 +0000)
committerassar <assar>
Sat, 29 Jul 2000 07:53:28 +0000 (07:53 +0000)
<[email protected]>

print-ip6.c

index afa1db74754c6cbebe356edbdfde3a4b1e456616..6e21a77a8637a83aca956dc37c55f9df3e7e8f93 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.8 2000-07-11 01:14:41 assar Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.9 2000-07-29 07:53:28 assar Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -73,12 +73,12 @@ ip6_print(register const u_char *bp, register int length)
         * This will never happen with BPF.  It does happen raw packet
         * dumps from -r.
         */
-       if ((int)ip & 15) {
+       if ((int)ip6 & 15) {
                static u_char *abuf;
 
                if (abuf == NULL)
                        abuf = malloc(snaplen);
-               memcpy(ip6, abuf, min(length, snaplen));
+               memcpy(abuf, ip6, min(length, snaplen));
                snapend += abuf - (u_char *)ip6;
                packetp = abuf;
                ip6 = (struct ip6_hdr *)abuf;