summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-07-06 19:54:39 +0000
committerbde <bde@FreeBSD.org>1998-07-06 19:54:39 +0000
commit170787cd28a2b65772d89d7d3037fb8e9c8a39ed (patch)
tree9314ce2bf1dda69556c3b089e245052d6f089b5a
parentbcc119fe0b9c7e44eff8a980368af8f6598043f7 (diff)
downloadFreeBSD-src-170787cd28a2b65772d89d7d3037fb8e9c8a39ed.zip
FreeBSD-src-170787cd28a2b65772d89d7d3037fb8e9c8a39ed.tar.gz
ioctl() request args are unsigned longs, so don't attempt to store
them as ints. Among other bugs, doing so at best caused benign overflow followed by fatal sign extension on machines with 32-bit ints and 64-bit longs.
-rw-r--r--sbin/ifconfig/ifconfig.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index bdf8e60..a20dc9c 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
#endif
static const char rcsid[] =
- "$Id$";
+ "$Id: ifconfig.c,v 1.36 1998/07/06 06:53:43 charnier Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -219,8 +219,8 @@ struct afswtch {
short af_af;
af_status *af_status;
af_getaddr *af_getaddr;
- int af_difaddr;
- int af_aifaddr;
+ u_long af_difaddr;
+ u_long af_aifaddr;
caddr_t af_ridreq;
caddr_t af_addreq;
} afs[] = {
OpenPOWER on IntegriCloud