mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
ITS#4101 fgets leaves NL in input buffer
This commit is contained in:
parent
cfa2eefe3c
commit
059e7c62ce
1 changed files with 1 additions and 1 deletions
|
|
@ -206,7 +206,7 @@ main(int argc, char **argv)
|
|||
if (havedn)
|
||||
retval = domodrdn( ld, entrydn, rdn, newSuperior, remove_old_RDN );
|
||||
else while ((rc == 0 || contoper) && fgets(buf, sizeof(buf), fp) != NULL) {
|
||||
if ( *buf != '\0' ) { /* blank lines optional, skip */
|
||||
if ( *buf != '\n' ) { /* blank lines optional, skip */
|
||||
buf[ strlen( buf ) - 1 ] = '\0'; /* remove nl */
|
||||
|
||||
if ( havedn ) { /* have DN, get RDN */
|
||||
|
|
|
|||
Loading…
Reference in a new issue