mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
Fixes ITS#1935
This commit is contained in:
parent
340e56ed0e
commit
26b33bf614
1 changed files with 6 additions and 4 deletions
|
|
@ -1137,12 +1137,14 @@ ldap_pvt_hex_unescape( char *s )
|
|||
|
||||
for ( p = s; *s != '\0'; ++s ) {
|
||||
if ( *s == '%' ) {
|
||||
if ( *++s != '\0' ) {
|
||||
*p = ldap_int_unhex( *s ) << 4;
|
||||
if ( *++s == '\0' ) {
|
||||
break;
|
||||
}
|
||||
if ( *++s != '\0' ) {
|
||||
*p++ += ldap_int_unhex( *s );
|
||||
*p = ldap_int_unhex( *s ) << 4;
|
||||
if ( *++s == '\0' ) {
|
||||
break;
|
||||
}
|
||||
*p++ += ldap_int_unhex( *s );
|
||||
} else {
|
||||
*p++ = *s;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue