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

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9099 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2000-10-08 13:20:12 +00:00
parent d5795c8616
commit 2f2114fbf0

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.
*
@@ -265,6 +265,11 @@ krb5_copy_encrypted (kx_context *kc, int fd1, int fd2)
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);