Fix ITS#1843, ldap_pvt_str2upper NULL string

This commit is contained in:
Howard Chu 2002-06-07 13:37:47 +00:00
parent 2494d1f5a8
commit 66bdd634fb

View File

@ -103,8 +103,10 @@ ldap_pvt_str2upper( char *str )
char *s;
/* to upper */
for ( s = str; *s; s++ ) {
*s = TOUPPER( (unsigned char) *s );
if ( str ) {
for ( s = str; *s; s++ ) {
*s = TOUPPER( (unsigned char) *s );
}
}
return( str );
@ -116,8 +118,10 @@ ldap_pvt_str2lower( char *str )
char *s;
/* to lower */
for ( s = str; *s; s++ ) {
*s = TOLOWER( (unsigned char) *s );
if ( str ) {
for ( s = str; *s; s++ ) {
*s = TOLOWER( (unsigned char) *s );
}
}
return( str );