1 Star 0 Fork 18

bitianyuan/libssh2

forked from src-openEuler/libssh2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-We-should-check-whether-key_method-is-a-NULL-pointer.patch 957 Bytes
一键复制 编辑 原始数据 按行查看 历史
bitianyuan 提交于 2024-11-06 15:51 . backport some upstream patches
From bec57c409d40822a23f03d2136f33b75b01b4b58 Mon Sep 17 00:00:00 2001
From: renmingshuai <[email protected]>
Date: Sat, 1 Jul 2023 10:14:48 +0800
Subject: [PATCH] We should check whether *key_method is a NULL pointer instead
of key_method
Signed-off-by: renmingshuai <[email protected]>
Reference:https://github.com/libssh2/libssh2/commit/bec57c409d40822a23f03d2136f33b75b01b4b58
Conflict:NA
---
src/userauth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/userauth.c b/src/userauth.c
index e7578759..5ce4ccb1 100644
--- a/src/userauth.c
+++ b/src/userauth.c
@@ -1410,7 +1410,7 @@ _libssh2_key_sign_algorithm(LIBSSH2_SESSION *session,
LIBSSH2_FREE(session, *key_method);
*key_method = LIBSSH2_ALLOC(session, match_len);
- if(key_method) {
+ if(*key_method) {
memcpy(*key_method, match, match_len);
*key_method_len = match_len;
}
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bitianyuan/libssh2.git
[email protected]:bitianyuan/libssh2.git
bitianyuan
libssh2
libssh2
master

搜索帮助