Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Dragoș Haiduc
OpenLDAP
Commits
76ef5307
Commit
76ef5307
authored
18 years ago
by
Quanah Gibson-Mount
Browse files
Options
Downloads
Patches
Plain Diff
Backport LDIF_MAXLINE bit from HEAD, instead of using BUFSIZ
parent
a50be025
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/liblutil/ldif.c
+3
-2
3 additions, 2 deletions
libraries/liblutil/ldif.c
with
3 additions
and
2 deletions
libraries/liblutil/ldif.c
+
3
−
2
View file @
76ef5307
...
...
@@ -777,6 +777,7 @@ ldif_close(
}
}
#define LDIF_MAXLINE 4096
/*
* ldif_read_record - read an ldif record. Return 1 for success, 0 for EOF.
*/
...
...
@@ -787,7 +788,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 +883,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