mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-04-12 15:10:31 +08:00
Import ITS#1935 fix from HEAD - overflow in ldap_pvt_hex_unescape()
This commit is contained in:
parent
68fd171c11
commit
114d16494c
@ -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…
x
Reference in New Issue
Block a user