Skip to content
Snippets Groups Projects
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
Branches
Tags
No related merge requests found
......@@ -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 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment