summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-11-12 11:06:32 +1100
committerDamien Miller <djm@mindrot.org>2001-11-12 11:06:32 +1100
commit79faeff2c1e9e25a0d7d9b11f168a96ca02d46f7 (patch)
tree9a3c1e9e9ccaed3e078c96294052d0519996bc4c
parentf655207a46fa4eeaa38f86e09cf6bca6537b50a8 (diff)
- markus@cvs.openbsd.org 2001/11/09 18:59:23
[clientloop.c serverloop.c] don't memset too much memory, ok millert@ original patch from jlk@kamens.brookline.ma.us via nalin@redhat.com
-rw-r--r--ChangeLog6
-rw-r--r--clientloop.c10
-rw-r--r--serverloop.c6
3 files changed, 13 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 5fc27418..237e74b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -54,6 +54,10 @@
Accepted publickey for ROOT from 127.0.0.1 port 42734 ssh2
becomes
Accepted publickey for root from 127.0.0.1 port 42734 ssh2
+ - markus@cvs.openbsd.org 2001/11/09 18:59:23
+ [clientloop.c serverloop.c]
+ don't memset too much memory, ok millert@
+ original patch from jlk@kamens.brookline.ma.us via nalin@redhat.com
20011109
- (stevesk) auth-pam.c: use do_pam_authenticate(PAM_DISALLOW_NULL_AUTHTOK)
@@ -6863,4 +6867,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.1650 2001/11/12 00:06:06 djm Exp $
+$Id: ChangeLog,v 1.1651 2001/11/12 00:06:32 djm Exp $
diff --git a/clientloop.c b/clientloop.c
index e8cd4998..cbcb1d19 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -59,7 +59,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: clientloop.c,v 1.86 2001/10/24 19:57:40 markus Exp $");
+RCSID("$OpenBSD: clientloop.c,v 1.87 2001/11/09 18:59:23 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -346,8 +346,8 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp,
if (session_closed && !channel_still_open() &&
!packet_have_data_to_write()) {
/* clear mask since we did not call select() */
- memset(*readsetp, 0, *maxfdp);
- memset(*writesetp, 0, *maxfdp);
+ memset(*readsetp, 0, *nallocp);
+ memset(*writesetp, 0, *nallocp);
return;
} else {
FD_SET(connection_in, *readsetp);
@@ -375,8 +375,8 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp,
* We have to return, because the mainloop checks for the flags
* set by the signal handlers.
*/
- memset(*readsetp, 0, *maxfdp);
- memset(*writesetp, 0, *maxfdp);
+ memset(*readsetp, 0, *nallocp);
+ memset(*writesetp, 0, *nallocp);
if (errno == EINTR)
return;
diff --git a/serverloop.c b/serverloop.c
index 983fe744..0da805f0 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -35,7 +35,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: serverloop.c,v 1.82 2001/10/10 22:18:47 markus Exp $");
+RCSID("$OpenBSD: serverloop.c,v 1.83 2001/11/09 18:59:23 markus Exp $");
#include "xmalloc.h"
#include "packet.h"
@@ -272,8 +272,8 @@ wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp, int *maxfdp,
ret = select((*maxfdp)+1, *readsetp, *writesetp, NULL, tvp);
if (ret == -1) {
- memset(*readsetp, 0, *maxfdp);
- memset(*writesetp, 0, *maxfdp);
+ memset(*readsetp, 0, *nallocp);
+ memset(*writesetp, 0, *nallocp);
if (errno != EINTR)
error("select: %.100s", strerror(errno));
} else if (ret == 0 && client_alive_scheduled)