Ensure ms_remain is always initialized, similar to what we do in
authordtucker <dtucker@openbsd.org>
Fri, 3 Mar 2023 10:23:42 +0000 (10:23 +0000)
committerdtucker <dtucker@openbsd.org>
Fri, 3 Mar 2023 10:23:42 +0000 (10:23 +0000)
ssh_packet_write_wait.  bz#2687, from jjelen at redhat.com.

usr.bin/ssh/packet.c

index 9c7379b..a71820f 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.308 2022/08/31 02:56:40 djm Exp $ */
+/* $OpenBSD: packet.c,v 1.309 2023/03/03 10:23:42 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1304,7 +1304,7 @@ int
 ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
 {
        struct session_state *state = ssh->state;
-       int len, r, ms_remain;
+       int len, r, ms_remain = 0;
        struct pollfd pfd;
        char buf[8192];
        struct timeval start;