fix bus errors; reported on comp.os.bsd.openbsd.misc via matthieu@.
This commit is contained in:
parent
c3affbdab2
commit
7bc8a3a5de
@ -1,6 +1,6 @@
|
|||||||
$OpenBSD: patch-fping_c,v 1.3 2002/03/29 07:25:52 form Exp $
|
$OpenBSD: patch-fping_c,v 1.4 2003/01/28 05:03:32 fgsch Exp $
|
||||||
--- fping.c.orig Thu Jan 9 02:29:43 1997
|
--- fping.c.orig Wed Jan 8 17:29:43 1997
|
||||||
+++ fping.c Fri Mar 29 13:17:47 2002
|
+++ fping.c Tue Jan 28 01:55:42 2003
|
||||||
@@ -186,7 +186,11 @@ extern "C" {
|
@@ -186,7 +186,11 @@ extern "C" {
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -84,7 +84,7 @@ $OpenBSD: patch-fping_c,v 1.3 2002/03/29 07:25:52 form Exp $
|
|||||||
/* The alpha headers are decidedly broken.
|
/* The alpha headers are decidedly broken.
|
||||||
* Using an ANSI compiler, it provides ip_vhl instead of ip_hl and
|
* Using an ANSI compiler, it provides ip_vhl instead of ip_hl and
|
||||||
* ip_v. So, to get ip_hl, we mask off the bottom four bits.
|
* ip_v. So, to get ip_hl, we mask off the bottom four bits.
|
||||||
@@ -1144,7 +1168,6 @@ int wait_for_reply()
|
@@ -1144,13 +1168,12 @@ int wait_for_reply()
|
||||||
h=table[n];
|
h=table[n];
|
||||||
|
|
||||||
/* received ping is cool, so process it */
|
/* received ping is cool, so process it */
|
||||||
@ -92,3 +92,10 @@ $OpenBSD: patch-fping_c,v 1.3 2002/03/29 07:25:52 form Exp $
|
|||||||
h->waiting = 0;
|
h->waiting = 0;
|
||||||
h->timeout = timeout;
|
h->timeout = timeout;
|
||||||
h->num_recv++; h->num_recv_i++;
|
h->num_recv++; h->num_recv_i++;
|
||||||
|
|
||||||
|
pdp = (PING_DATA *)icp->icmp_data;
|
||||||
|
- sent_time = pdp->ping_ts;
|
||||||
|
+ memcpy(&sent_time, &(pdp->ping_ts), sizeof(struct timeval));
|
||||||
|
this_count = pdp->ping_count;
|
||||||
|
#ifdef DEBUG
|
||||||
|
if (trace_flag)
|
||||||
|
Loading…
Reference in New Issue
Block a user