代码拉取完成,页面将自动刷新
From 1a9e8811f7fa7538a52e2dd0150a094368471bf3 Mon Sep 17 00:00:00 2001
From: Anders Borum <[email protected]>
Date: Tue, 8 Oct 2024 08:11:02 +0200
Subject: [PATCH] session: support server banners up to 8192 bytes (was: 256)
If server had banner exceeding 256 bytes there wasn't enough room in
`_LIBSSH2_SESSION.banner_TxRx_banner`. Only the first 256 bytes would be
read making the first packet read fail but also dooming key exchange as
`session->remote.banner` didn't include everything.
This change bumps the banner buffer to 8KB to match OpenSSH.
Fixes #1442
Closes #1443
Reference:https://github.com/libssh2/libssh2/commit/1a9e8811f7fa7538a52e2dd0150a094368471bf3
Conflict:NA
---
src/libssh2_priv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h
index ee1d8b5..b1f32b1 100644
--- a/src/libssh2_priv.h
+++ b/src/libssh2_priv.h
@@ -742,7 +742,7 @@ struct _LIBSSH2_SESSION
/* State variables used in libssh2_banner_send() */
libssh2_nonblocking_states banner_TxRx_state;
- char banner_TxRx_banner[256];
+ char banner_TxRx_banner[8192];
ssize_t banner_TxRx_total_send;
/* State variables used in libssh2_kexinit() */
--
2.43.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。