summaryrefslogtreecommitdiff
path: root/clientloop.c
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 /clientloop.c
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
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/clientloop.c b/clientloop.c
index e8cd49988..cbcb1d199 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -59,7 +59,7 @@
59 */ 59 */
60 60
61#include "includes.h" 61#include "includes.h"
62RCSID("$OpenBSD: clientloop.c,v 1.86 2001/10/24 19:57:40 markus Exp $"); 62RCSID("$OpenBSD: clientloop.c,v 1.87 2001/11/09 18:59:23 markus Exp $");
63 63
64#include "ssh.h" 64#include "ssh.h"
65#include "ssh1.h" 65#include "ssh1.h"
@@ -346,8 +346,8 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp,
346 if (session_closed && !channel_still_open() && 346 if (session_closed && !channel_still_open() &&
347 !packet_have_data_to_write()) { 347 !packet_have_data_to_write()) {
348 /* clear mask since we did not call select() */ 348 /* clear mask since we did not call select() */
349 memset(*readsetp, 0, *maxfdp); 349 memset(*readsetp, 0, *nallocp);
350 memset(*writesetp, 0, *maxfdp); 350 memset(*writesetp, 0, *nallocp);
351 return; 351 return;
352 } else { 352 } else {
353 FD_SET(connection_in, *readsetp); 353 FD_SET(connection_in, *readsetp);
@@ -375,8 +375,8 @@ client_wait_until_can_do_something(fd_set **readsetp, fd_set **writesetp,
375 * We have to return, because the mainloop checks for the flags 375 * We have to return, because the mainloop checks for the flags
376 * set by the signal handlers. 376 * set by the signal handlers.
377 */ 377 */
378 memset(*readsetp, 0, *maxfdp); 378 memset(*readsetp, 0, *nallocp);
379 memset(*writesetp, 0, *maxfdp); 379 memset(*writesetp, 0, *nallocp);
380 380
381 if (errno == EINTR) 381 if (errno == EINTR)
382 return; 382 return;