/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
ber_len_t i;
for ( i = 0; val[i]; i++ ) {
- if ( !isascii( val[i] ) || !isprint( val[i] ) ) {
+ if ( !isascii( val[i] ) || !isprint( (unsigned char) val[i] ) ) {
return 1;
}
}
if ( last_ch == '\n' ) {
(*lno)++;
- if ( line[0] == '\n' ) {
+ if ( line[0] == '\n' ||
+ ( line[0] == '\r' && line[1] == '\n' )) {
if ( !found_entry ) {
lcur = 0;
top_comment = 0;
}
ptr = line + STRLENOF("include:");
- while (isspace(*ptr)) ptr++;
+ while (isspace((unsigned char) *ptr)) ptr++;
fp2 = ldif_open_url( ptr );
if ( fp2 ) {
LDIFFP *lnew = ber_memalloc( sizeof( LDIFFP ));