diff options
author | darrenr <darrenr@FreeBSD.org> | 2007-10-18 21:42:51 +0000 |
---|---|---|
committer | darrenr <darrenr@FreeBSD.org> | 2007-10-18 21:42:51 +0000 |
commit | 8e202f8079930a406d5a5923404c860351dcb141 (patch) | |
tree | decf12982a20f5504c97e45744f1d91e532588a7 /sys/contrib/ipfilter/netinet/ip_proxy.c | |
parent | b8cc98bd6c45a4a050a69e926139c5db53e1601d (diff) | |
download | FreeBSD-src-8e202f8079930a406d5a5923404c860351dcb141.zip FreeBSD-src-8e202f8079930a406d5a5923404c860351dcb141.tar.gz |
Import IPFilter 4.1.28
Diffstat (limited to 'sys/contrib/ipfilter/netinet/ip_proxy.c')
-rw-r--r-- | sys/contrib/ipfilter/netinet/ip_proxy.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.c b/sys/contrib/ipfilter/netinet/ip_proxy.c index 96eb172..04e9f89 100644 --- a/sys/contrib/ipfilter/netinet/ip_proxy.c +++ b/sys/contrib/ipfilter/netinet/ip_proxy.c @@ -103,7 +103,7 @@ struct file; /* END OF INCLUDES */ #if !defined(lint) -static const char rcsid[] = "@(#)$Id: ip_proxy.c,v 2.62.2.20 2007/05/31 12:27:36 darrenr Exp $"; +static const char rcsid[] = "@(#)$Id: ip_proxy.c,v 2.62.2.21 2007/06/02 21:22:28 darrenr Exp $"; #endif static int appr_fixseqack __P((fr_info_t *, ip_t *, ap_session_t *, int )); @@ -295,7 +295,7 @@ int mode; void *ctx; { ap_ctl_t ctl; - caddr_t ptr; + u_char *ptr; int error; mode = mode; /* LINT */ @@ -303,11 +303,13 @@ void *ctx; switch (cmd) { case SIOCPROXY : - BCOPYIN(data, &ctl, sizeof(ctl)); + error = BCOPYIN(data, &ctl, sizeof(ctl)); + if (error != 0) + return EFAULT; ptr = NULL; if (ctl.apc_dsize > 0) { - KMALLOCS(ptr, caddr_t, ctl.apc_dsize); + KMALLOCS(ptr, u_char *, ctl.apc_dsize); if (ptr == NULL) error = ENOMEM; else { |