Commit 70092b38 authored by Howard Chu's avatar Howard Chu
Browse files

Fix ITS#1843, don't deref NULL string in ldap_pvt_str2upper

parent 81017987
......@@ -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 );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment