Uninitialised length variable passed to accept(), causing random accept()
failures due to EFAULT. This is screaming out to go into 2.2
This commit is contained in:
parent
a8ca22b2d8
commit
8ada212ae6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19777
@ -29,7 +29,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: yppasswd_comm.c,v 1.10 1996/02/03 04:41:59 wpaul Exp $
|
||||
* $Id: yppasswd_comm.c,v 1.1.1.1 1996/02/12 15:09:01 wpaul Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -73,7 +73,7 @@
|
||||
#include "ypxfr_extern.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] = "$Id: yppasswd_comm.c,v 1.10 1996/02/03 04:41:59 wpaul Exp $";
|
||||
static const char rcsid[] = "$Id: yppasswd_comm.c,v 1.1.1.1 1996/02/12 15:09:01 wpaul Exp $";
|
||||
#endif
|
||||
|
||||
char *sockname = "/var/run/ypsock";
|
||||
@ -218,6 +218,7 @@ struct master_yppasswd *getdat(sock)
|
||||
break;
|
||||
}
|
||||
|
||||
len = sizeof(us);
|
||||
if ((serv_sock = accept(sock, (struct sockaddr *)&us, &len)) == -1) {
|
||||
yp_error("accept failed: %s", strerror(errno));
|
||||
return(NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user