summaryrefslogtreecommitdiffstats
path: root/usr.bin/quota
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1998-06-09 04:31:02 +0000
committerimp <imp@FreeBSD.org>1998-06-09 04:31:02 +0000
commit8c96be00ef748f03f9e7f9f5934e7b0d53d1c872 (patch)
tree4cac82b29697cfe595adc937f0a97621ae134760 /usr.bin/quota
parent9a6732bd4e65d3bdaeb59e6b7cd0331484e1c331 (diff)
downloadFreeBSD-src-8c96be00ef748f03f9e7f9f5934e7b0d53d1c872.zip
FreeBSD-src-8c96be00ef748f03f9e7f9f5934e7b0d53d1c872.tar.gz
Don't assume that hp->h_lenght == 4. Be conservative in its use.
Submitted by: J. Assange a long time ago.
Diffstat (limited to 'usr.bin/quota')
-rw-r--r--usr.bin/quota/quota.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/quota/quota.c b/usr.bin/quota/quota.c
index e15164a..5081645 100644
--- a/usr.bin/quota/quota.c
+++ b/usr.bin/quota/quota.c
@@ -45,7 +45,7 @@ static const char copyright[] =
static char sccsid[] = "from: @(#)quota.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$Id: quota.c,v 1.7 1997/08/04 06:45:11 charnier Exp $";
+ "$Id: quota.c,v 1.8 1998/01/20 12:53:43 bde Exp $";
#endif /* not lint */
/*
@@ -692,7 +692,7 @@ callaurpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
return ((int) RPC_UNKNOWNHOST);
timeout.tv_usec = 0;
timeout.tv_sec = 6;
- bcopy(hp->h_addr, &server_addr.sin_addr, hp->h_length);
+ bcopy(hp->h_addr, &server_addr.sin_addr, MIN(hp->h_length,sizeof(server_addr.sin_addr)));
server_addr.sin_family = AF_INET;
server_addr.sin_port = 0;
OpenPOWER on IntegriCloud