Skip to content
Snippets Groups Projects
Commit 76ef5307 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

Backport LDIF_MAXLINE bit from HEAD, instead of using BUFSIZ

parent a50be025
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment