1 Star 0 Fork 43

pojunxing/openldap

forked from src-openEuler/openldap 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-ITS-9811-Allow-newlines-at-end-of-included-file.patch 1007 Bytes
一键复制 编辑 原始数据 按行查看 历史
compile_success 提交于 2022-11-07 12:04 . backport patch
From 0dae0704c01adb8b336d35647e75b45c0c21cc10 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= <ondra@mistotebe.net>
Date: Fri, 18 Mar 2022 14:51:45 +0000
Subject: [PATCH] ITS#9811 Allow newlines at end of included file
---
libraries/libldap/ldif.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libraries/libldap/ldif.c b/libraries/libldap/ldif.c
index 7ca5e32cf..900a97960 100644
--- a/libraries/libldap/ldif.c
+++ b/libraries/libldap/ldif.c
@@ -796,6 +796,7 @@ ldif_read_record(
* back to a previous file. (return from an include)
*/
while ( feof( lfp->fp )) {
+pop:
if ( lfp->prev ) {
LDIFFP *tmp = lfp->prev;
fclose( lfp->fp );
@@ -808,6 +809,10 @@ ldif_read_record(
}
if ( !stop ) {
if ( fgets( line, sizeof( line ), lfp->fp ) == NULL ) {
+ if ( !found_entry && !ferror( lfp->fp ) ) {
+ /* ITS#9811 Reached the end looking for an entry, try again */
+ goto pop;
+ }
stop = 1;
len = 0;
} else {
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chengyechun/openldap.git
git@gitee.com:chengyechun/openldap.git
chengyechun
openldap
openldap
master

搜索帮助