mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-21 07:09:34 -05:00
ITS#9811 Allow newlines at end of included file
This commit is contained in:
parent
252a7dbbd0
commit
0dae0704c0
1 changed files with 5 additions and 0 deletions
|
|
@ -796,6 +796,7 @@ ldif_read_record(
|
||||||
* back to a previous file. (return from an include)
|
* back to a previous file. (return from an include)
|
||||||
*/
|
*/
|
||||||
while ( feof( lfp->fp )) {
|
while ( feof( lfp->fp )) {
|
||||||
|
pop:
|
||||||
if ( lfp->prev ) {
|
if ( lfp->prev ) {
|
||||||
LDIFFP *tmp = lfp->prev;
|
LDIFFP *tmp = lfp->prev;
|
||||||
fclose( lfp->fp );
|
fclose( lfp->fp );
|
||||||
|
|
@ -808,6 +809,10 @@ ldif_read_record(
|
||||||
}
|
}
|
||||||
if ( !stop ) {
|
if ( !stop ) {
|
||||||
if ( fgets( line, sizeof( line ), lfp->fp ) == NULL ) {
|
if ( fgets( line, sizeof( line ), lfp->fp ) == NULL ) {
|
||||||
|
if ( !found_entry && !ferror( lfp->fp ) ) {
|
||||||
|
/* ITS#9811 Reached the end looking for an entry, try again */
|
||||||
|
goto pop;
|
||||||
|
}
|
||||||
stop = 1;
|
stop = 1;
|
||||||
len = 0;
|
len = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue