diff options
author | imp <imp@FreeBSD.org> | 1997-12-24 01:00:24 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1997-12-24 01:00:24 +0000 |
commit | e1ae752d3376d0a6b0a41bcfea0f8269fe73feba (patch) | |
tree | 4743c60501e3d45c7f1650666e58aed0f3d1ce3b | |
parent | 03672be414165cd00bdbbaa67701f3cdf8a1fb2f (diff) | |
download | FreeBSD-src-e1ae752d3376d0a6b0a41bcfea0f8269fe73feba.zip FreeBSD-src-e1ae752d3376d0a6b0a41bcfea0f8269fe73feba.tar.gz |
Be extra paranoid about trusting the length of the data returned by
gethostbyaddr.
Submitted by: Julian Assange
-rw-r--r-- | sbin/umount/umount.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c index f4951e4..9b4c472 100644 --- a/sbin/umount/umount.c +++ b/sbin/umount/umount.c @@ -280,7 +280,7 @@ umountfs(name, typelist) memset(&saddr, 0, sizeof(saddr)); saddr.sin_family = AF_INET; saddr.sin_port = 0; - memmove(&saddr.sin_addr, hp->h_addr, hp->h_length); + memmove(&saddr.sin_addr, hp->h_addr, MIN(hp->h_length, sizeof(saddr.sin_addr))); pertry.tv_sec = 3; pertry.tv_usec = 0; so = RPC_ANYSOCK; |