Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Ng
OpenLDAP
Commits
9446f855
Commit
9446f855
authored
18 years ago
by
Howard Chu
Browse files
Options
Downloads
Patches
Plain Diff
define LDIF_MAXLINE instead of using BUFSIZ
parent
18198247
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/liblutil/ldif.c
+4
-2
4 additions, 2 deletions
libraries/liblutil/ldif.c
with
4 additions
and
2 deletions
libraries/liblutil/ldif.c
+
4
−
2
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment