From 76ef53070f38cbe057a984eb70e04781ce900064 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Fri, 15 Dec 2006 00:34:42 +0000 Subject: [PATCH] Backport LDIF_MAXLINE bit from HEAD, instead of using BUFSIZ --- libraries/liblutil/ldif.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/liblutil/ldif.c b/libraries/liblutil/ldif.c index c639f87562..d84eab7890 100644 --- a/libraries/liblutil/ldif.c +++ b/libraries/liblutil/ldif.c @@ -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; -- 2.39.5