Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
bb149134
Commit
bb149134
authored
Feb 07, 2014
by
Howard Chu
Committed by
Quanah Gibson-Mount
Apr 01, 2014
Browse files
More for ITS#4365 refix CR/LF handling
Was rejecting "-\r\n" in input LDIF
parent
9e22d8f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/libldap/ldif.c
View file @
bb149134
...
...
@@ -853,11 +853,16 @@ ldif_read_record(
line
[
++
len
]
=
'\0'
;
}
/* Squash \r\n to \n */
if
(
len
>
1
&&
line
[
len
-
2
]
==
'\r'
)
{
len
--
;
line
[
len
-
1
]
=
'\n'
;
}
if
(
last_ch
==
'\n'
)
{
(
*
lno
)
++
;
if
(
line
[
0
]
==
'\n'
||
(
line
[
0
]
==
'\r'
&&
line
[
1
]
==
'\n'
))
{
if
(
line
[
0
]
==
'\n'
)
{
if
(
!
found_entry
)
{
lcur
=
0
;
top_comment
=
0
;
...
...
@@ -887,10 +892,6 @@ ldif_read_record(
len
--
;
line
[
len
]
=
'\0'
;
}
if
(
line
[
len
-
1
]
==
'\r'
)
{
len
--
;
line
[
len
]
=
'\0'
;
}
ptr
=
line
+
STRLENOF
(
"include:"
);
while
(
isspace
((
unsigned
char
)
*
ptr
))
ptr
++
;
...
...
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