diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c index f4951e419bde..9b4c472a772e 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;