1 Star 0 Fork 43

like/openldap

forked from src-openEuler/openldap 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2020-36224_36225_36226-4.patch 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
From d169e7958a3e0dc70f59c8374bf8a59833b7bdd8 Mon Sep 17 00:00:00 2001
From: Howard Chu <hyc@openldap.org>
Date: Tue, 1 Dec 2020 19:03:24 +0000
Subject: [PATCH] ITS#9413 fix slap_parse_user
---
servers/slapd/saslauthz.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/servers/slapd/saslauthz.c b/servers/slapd/saslauthz.c
index 4a9420b37..b17f34a21 100644
--- a/servers/slapd/saslauthz.c
+++ b/servers/slapd/saslauthz.c
@@ -156,10 +156,9 @@ int slap_parse_user( struct berval *id, struct berval *user,
user->bv_val++;
user->bv_len = id->bv_len - ( user->bv_val - id->bv_val );
- mech->bv_val = ber_bvchr( id, '.' );
- if ( !BER_BVISNULL( mech ) ) {
- mech->bv_val[ 0 ] = '\0';
- mech->bv_val++;
+ if ( id->bv_val[1] == '.' ) {
+ id->bv_val[1] = '\0';
+ mech->bv_val = id->bv_val + 2;
mech->bv_len = user->bv_val - mech->bv_val - 1;
realm->bv_val = ber_bvchr( mech, '/' );
@@ -172,6 +171,7 @@ int slap_parse_user( struct berval *id, struct berval *user,
}
} else {
+ BER_BVZERO( mech );
BER_BVZERO( realm );
}
--
GitLab
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/pangzihapipangzi/openldap.git
git@gitee.com:pangzihapipangzi/openldap.git
pangzihapipangzi
openldap
openldap
master

搜索帮助