- djm@cvs.openbsd.org 2009/12/06 23:53:45

[roaming_common.c]
     use socklen_t for getsockopt optlen parameter; reported by
     Steve.McClellan AT radisys.com, ok dtucker@
This commit is contained in:
Darren Tucker 2010-01-08 18:51:14 +11:00
parent 5246df47a4
commit 75694dbe77
2 changed files with 9 additions and 5 deletions

View File

@ -95,6 +95,10 @@
- dtucker@cvs.openbsd.org 2009/12/06 23:41:15
[sshconnect2.c]
zap unused variable and strlen; from Steve McClellan, ok djm
- djm@cvs.openbsd.org 2009/12/06 23:53:45
[roaming_common.c]
use socklen_t for getsockopt optlen parameter; reported by
Steve.McClellan AT radisys.com, ok dtucker@
20091226
- (tim) [contrib/cygwin/Makefile] Install ssh-copy-id and ssh-copy-id.1

View File

@ -1,4 +1,4 @@
/* $OpenBSD: roaming_common.c,v 1.6 2009/10/24 11:22:37 andreas Exp $ */
/* $OpenBSD: roaming_common.c,v 1.7 2009/12/06 23:53:45 djm Exp $ */
/*
* Copyright (c) 2004-2009 AppGate Network Security AB
*
@ -52,9 +52,9 @@ int
get_snd_buf_size()
{
int fd = packet_get_connection_out();
int optval, optvallen;
int optval;
socklen_t optvallen = sizeof(optval);
optvallen = sizeof(optval);
if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &optval, &optvallen) != 0)
optval = DEFAULT_ROAMBUF;
return optval;
@ -64,9 +64,9 @@ int
get_recv_buf_size()
{
int fd = packet_get_connection_in();
int optval, optvallen;
int optval;
socklen_t optvallen = sizeof(optval);
optvallen = sizeof(optval);
if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &optval, &optvallen) != 0)
optval = DEFAULT_ROAMBUF;
return optval;