diff options
Diffstat (limited to 'contrib/ipfilter/ipsend/ipsend.c')
-rw-r--r-- | contrib/ipfilter/ipsend/ipsend.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/ipfilter/ipsend/ipsend.c b/contrib/ipfilter/ipsend/ipsend.c index f0d1a3f..b047dd0 100644 --- a/contrib/ipfilter/ipsend/ipsend.c +++ b/contrib/ipfilter/ipsend/ipsend.c @@ -348,6 +348,12 @@ char **argv; printf("Options: %d\n", olen); ti = (struct tcpiphdr *)malloc(olen + ip->ip_len); + if(!ti) + { + fprintf(stderr,"malloc failed\n"); + exit(2); + } + bcopy((char *)ip, (char *)ti, sizeof(*ip)); ip = (ip_t *)ti; ip->ip_hl = (olen >> 2); |