fix pointer-to-int cast problem
This commit is contained in:
parent
3bfa71c0c3
commit
935a2e30db
|
@ -3974,9 +3974,15 @@ auth_server (root, lto_server, lfrom_server, verify_only, do_gssapi, hostname)
|
|||
if (do_gssapi)
|
||||
{
|
||||
#ifdef HAVE_GSSAPI
|
||||
int fd = (int) lto_server->closure;
|
||||
int fd;
|
||||
struct stat s;
|
||||
|
||||
if ((intptr_t) lto_server->closure > INT_MAX)
|
||||
{
|
||||
error (1, 0, "file descriptor out of range");
|
||||
}
|
||||
fd = (intptr_t)lto_server->closure;
|
||||
|
||||
if (fstat (fd, &s) < 0 || !S_ISSOCK(s.st_mode))
|
||||
{
|
||||
error (1, 0, "gserver currently only enabled for socket connections");
|
||||
|
|
Loading…
Reference in New Issue