Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
0dae0704
Commit
0dae0704
authored
Mar 18, 2022
by
Ondřej Kuzník
Committed by
Quanah Gibson-Mount
Mar 21, 2022
Browse files
ITS
#9811
Allow newlines at end of included file
parent
252a7dbb
Pipeline
#4218
passed with stage
in 39 minutes and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
libraries/libldap/ldif.c
View file @
0dae0704
...
...
@@ -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
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment