mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 18:18:06 -05:00
Import ITS#1935 fix from HEAD - overflow in ldap_pvt_hex_unescape()
This commit is contained in:
parent
68fd171c11
commit
114d16494c
1 changed files with 6 additions and 4 deletions
|
|
@ -989,12 +989,14 @@ ldap_pvt_hex_unescape( char *s )
|
|||
|
||||
for ( p = s; *s != '\0'; ++s ) {
|
||||
if ( *s == '%' ) {
|
||||
if ( *++s != '\0' ) {
|
||||
*p = ldap_pvt_unhex( *s ) << 4;
|
||||
if ( *++s == '\0' ) {
|
||||
break;
|
||||
}
|
||||
if ( *++s != '\0' ) {
|
||||
*p++ += ldap_pvt_unhex( *s );
|
||||
*p = ldap_pvt_unhex( *s ) << 4;
|
||||
if ( *++s == '\0' ) {
|
||||
break;
|
||||
}
|
||||
*p++ += ldap_pvt_unhex( *s );
|
||||
} else {
|
||||
*p++ = *s;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue