This fixes a potential uninitialized use of 'limits' in sftp_init() if
sftp_get_limits() returned early because of an unexpected message type.
ok djm@
-/* $OpenBSD: sftp-client.c,v 1.174 2023/09/08 06:10:02 djm Exp $ */
+/* $OpenBSD: sftp-client.c,v 1.175 2023/11/13 09:18:19 tobhe Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
/* Disable the limits extension */
conn->exts &= ~SFTP_EXT_LIMITS;
sshbuf_free(msg);
- return 0;
+ return -1;
}
memset(limits, 0, sizeof(*limits));