summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/rcmd.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-06-03 22:43:42 +0000
committerderaadt <deraadt@openbsd.org>1997-06-03 22:43:42 +0000
commit8061bb022735b1465967d1f2aa9cf69a0759f610 (patch)
treea7de57e22df2df56d81a96a7abfed1d4d1da4144 /lib/libc/net/rcmd.c
parentMake mkfs.c malloc its large buffers, which saves about 200K of bss size (diff)
downloadwireguard-openbsd-8061bb022735b1465967d1f2aa9cf69a0759f610.tar.xz
wireguard-openbsd-8061bb022735b1465967d1f2aa9cf69a0759f610.zip
howmany(x+1, NFDBITS)
Diffstat (limited to 'lib/libc/net/rcmd.c')
-rw-r--r--lib/libc/net/rcmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c
index 3c483a809bf..468c93eb637 100644
--- a/lib/libc/net/rcmd.c
+++ b/lib/libc/net/rcmd.c
@@ -34,7 +34,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: rcmd.c,v 1.21 1997/05/28 21:40:11 deraadt Exp $";
+static char *rcsid = "$OpenBSD: rcmd.c,v 1.22 1997/06/03 22:43:42 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -166,7 +166,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
if (s2 < 0)
goto bad;
- readsp = (fd_set *)malloc(howmany(MAX(s, s2), NFDBITS) *
+ readsp = (fd_set *)malloc(howmany(MAX(s, s2)+1, NFDBITS) *
sizeof(fd_mask));
if (readsp == NULL)
goto bad;