From 2677773b06c284eb71d8bdb75ce7f21d401c2fec Mon Sep 17 00:00:00 2001 From: leitner Date: Wed, 29 Mar 2017 13:03:18 +0000 Subject: [PATCH] skip comment lines --- ldif_parse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ldif_parse.c b/ldif_parse.c index 509b131..30e3584 100644 --- a/ldif_parse.c +++ b/ldif_parse.c @@ -109,8 +109,9 @@ nomem: do { uint32_t tmp, val; base64=binary=0; - n=ofs+buffer_get_token(b,buf+ofs,8192-ofs,":",1); + n=ofs+buffer_get_token(b,buf+ofs,8192-ofs,":\n",2); if (n==ofs) break; + if (buf[0]=='#') continue; /* comment line */ i=scan_whitenskip(buf,n); if (buf[byte_chr(buf+i,n-i,'\n')]=='\n') { buffer_puts(buffer_2,"LDIF parse error: no key:value in line ");