Commit 0dae0704 authored by Ondřej Kuzník's avatar Ondřej Kuzník Committed by Quanah Gibson-Mount
Browse files

ITS#9811 Allow newlines at end of included file

parent 252a7dbb
Pipeline #4218 passed with stage
in 39 minutes and 34 seconds
......@@ -796,6 +796,7 @@ ldif_read_record(
* back to a previous file. (return from an include)
*/
while ( feof( lfp->fp )) {
pop:
if ( lfp->prev ) {
LDIFFP *tmp = lfp->prev;
fclose( lfp->fp );
......@@ -808,6 +809,10 @@ ldif_read_record(
}
if ( !stop ) {
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;
len = 0;
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment