summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/ipsend
diff options
context:
space:
mode:
authordarrenr <darrenr@FreeBSD.org>2001-02-04 14:25:38 +0000
committerdarrenr <darrenr@FreeBSD.org>2001-02-04 14:25:38 +0000
commit53b25e2c4c7f67b0a0f4809050fb478bd1ff2d88 (patch)
tree42f02e2ffdb2f882e95fd170ab2f77b41d909085 /contrib/ipfilter/ipsend
parentc417101ae55dd9941fb03ce6fce4955a6a2a2e8f (diff)
parent5e62aa9b3dacb0e670998fad60638b79751aff14 (diff)
downloadFreeBSD-src-53b25e2c4c7f67b0a0f4809050fb478bd1ff2d88.zip
FreeBSD-src-53b25e2c4c7f67b0a0f4809050fb478bd1ff2d88.tar.gz
This commit was generated by cvs2svn to compensate for changes in r72003,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/ipfilter/ipsend')
-rw-r--r--contrib/ipfilter/ipsend/ip.c10
-rw-r--r--contrib/ipfilter/ipsend/resend.c7
2 files changed, 15 insertions, 2 deletions
diff --git a/contrib/ipfilter/ipsend/ip.c b/contrib/ipfilter/ipsend/ip.c
index e81c890..c5eacb3 100644
--- a/contrib/ipfilter/ipsend/ip.c
+++ b/contrib/ipfilter/ipsend/ip.c
@@ -7,7 +7,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "%W% %G% (C)1995";
-static const char rcsid[] = "@(#)$Id: ip.c,v 2.1 1999/08/04 17:31:04 darrenr Exp $";
+static const char rcsid[] = "@(#)$Id: ip.c,v 2.1.4.1 2001/01/10 06:21:19 darrenr Exp $";
#endif
#include <errno.h>
#include <stdio.h>
@@ -99,7 +99,15 @@ int frag;
int err, iplen;
if (!ipbuf)
+ {
ipbuf = (char *)malloc(65536);
+ if(!ipbuf)
+ {
+ perror("malloc failed");
+ return -2;
+ }
+ }
+
eh = (ether_header_t *)ipbuf;
bzero((char *)A_A eh->ether_shost, sizeof(eh->ether_shost));
diff --git a/contrib/ipfilter/ipsend/resend.c b/contrib/ipfilter/ipsend/resend.c
index e4397ce..095aa9e 100644
--- a/contrib/ipfilter/ipsend/resend.c
+++ b/contrib/ipfilter/ipsend/resend.c
@@ -12,7 +12,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "@(#)resend.c 1.3 1/11/96 (C)1995 Darren Reed";
-static const char rcsid[] = "@(#)$Id: resend.c,v 2.1 1999/08/04 17:31:12 darrenr Exp $";
+static const char rcsid[] = "@(#)$Id: resend.c,v 2.1.4.1 2001/01/10 06:21:20 darrenr Exp $";
#endif
#include <stdio.h>
#include <netdb.h>
@@ -97,6 +97,11 @@ char *datain;
ip = (struct ip *)pbuf;
eh = (ether_header_t *)malloc(sizeof(*eh));
+ if(!eh)
+ {
+ perror("malloc failed");
+ return -2;
+ }
bzero((char *)A_A eh->ether_shost, sizeof(eh->ether_shost));
if (gwip.s_addr && (arp((char *)&gwip, dhost) == -1))
OpenPOWER on IntegriCloud