mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-04-12 15:10:31 +08:00
Fix ITS#1843, ldap_pvt_str2upper NULL string
This commit is contained in:
parent
2494d1f5a8
commit
66bdd634fb
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user