mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-12-04 23:44:50 +08:00
(ip6_print): fix flipped arguments to memcpy. From Rafal Maszkowski
<rzm@icm.edu.pl>
This commit is contained in:
parent
ed19831eeb
commit
1bdce8fba3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user