mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-04-12 15:10:31 +08:00
ITS#6755 pagedresults loop was accessing a closed FILE*.
This commit is contained in:
parent
293b5e51a5
commit
a7e0c6cd2e
@ -918,6 +918,15 @@ main( int argc, char **argv )
|
||||
tool_bind( ld );
|
||||
|
||||
getNextPage:
|
||||
/* fp may have been closed, need to reopen if code jumps
|
||||
* back here to getNextPage.
|
||||
*/
|
||||
if ( !fp && infile ) {
|
||||
if (( fp = fopen( infile, "r" )) == NULL ) {
|
||||
perror( infile );
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
save_nctrls = nctrls;
|
||||
i = nctrls;
|
||||
if ( nctrls > 0
|
||||
@ -1259,6 +1268,7 @@ getNextPage:
|
||||
}
|
||||
if ( fp != stdin ) {
|
||||
fclose( fp );
|
||||
fp = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user