(krb4_copy_encrypted): check that fds are not too large to select on

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9098 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2000-10-08 13:19:22 +00:00
parent df4a780888
commit d5795c8616

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1995 - 1999 Kungliga Tekniska H<>gskolan
* Copyright (c) 1995 - 2000 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -218,6 +218,11 @@ krb4_copy_encrypted (kx_context *kc,
fd_set fdset;
int ret;
if (fd1 >= FD_SETSIZE || fd2 >= FD_SETSIZE) {
warnx ("fd too large");
return 1;
}
FD_ZERO(&fdset);
FD_SET(fd1, &fdset);
FD_SET(fd2, &fdset);