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
9446f855
Commit
9446f855
authored
Nov 27, 2006
by
Howard Chu
Browse files
define LDIF_MAXLINE instead of using BUFSIZ
parent
18198247
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/liblutil/ldif.c
View file @
9446f855
...
...
@@ -777,6 +777,8 @@ ldif_close(
}
}
#define LDIF_MAXLINE 4096
/*
* ldif_read_record - read an ldif record. Return 1 for success, 0 for EOF.
*/
...
...
@@ -787,7 +789,7 @@ ldif_read_record(
char
**
bufp
,
/* ptr to malloced output buffer */
int
*
buflenp
)
/* ptr to length of *bufp */
{
char
linebuf
[
BUFSIZ
],
*
line
,
*
nbufp
;
char
linebuf
[
LDIF_MAXLINE
],
*
line
,
*
nbufp
;
ber_len_t
lcur
=
0
,
len
,
linesize
;
int
last_ch
=
'\n'
,
found_entry
=
0
,
stop
,
top_comment
=
0
;
...
...
@@ -882,7 +884,7 @@ ldif_read_record(
}
if
(
*
buflenp
-
lcur
<=
len
)
{
*
buflenp
+=
len
+
BUFSIZ
;
*
buflenp
+=
len
+
LDIF_MAXLINE
;
nbufp
=
ber_memrealloc
(
*
bufp
,
*
buflenp
);
if
(
nbufp
==
NULL
)
{
return
0
;
...
...
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