(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:
@@ -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).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -218,6 +218,11 @@ krb4_copy_encrypted (kx_context *kc,
|
|||||||
fd_set fdset;
|
fd_set fdset;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (fd1 >= FD_SETSIZE || fd2 >= FD_SETSIZE) {
|
||||||
|
warnx ("fd too large");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
FD_ZERO(&fdset);
|
FD_ZERO(&fdset);
|
||||||
FD_SET(fd1, &fdset);
|
FD_SET(fd1, &fdset);
|
||||||
FD_SET(fd2, &fdset);
|
FD_SET(fd2, &fdset);
|
||||||
|
Reference in New Issue
Block a user